code: public Set<Action> getDependencies(Action a) {
          if (!demandingNodes.containsKey(a)) {
              return Collections.emptySet();
          }
          Node n = demandingNodes.get(a);
          Set<Action> allActions = getFreeings(n);
          Set<Action> pre = new HashSet<>();
          for (Action action : allActions) {
              if (!action.equals(a) && a.getStart() >= action.getEnd()) {
                  pre.add(action);
              }
          }
          return pre;
      }
docs: Get the dependencies for an action.
  
  @param a the action to check
  @return its dependencies, may be empty