code: synchronized boolean addInterval(Interval i) {
          if (i == null || containsInterval(i) || !intervals.add(i)) {
              return false;
          }
  
          Object iStart = i.getStart();
          Object iFinish = i.getFinish();
  
          directedGraph.add(iStart);
          directedGraph.add(iFinish);
  
          Weight mindur = i.getSpecifiedMinimumLength();
          Weight maxdur = i.getSpecifiedMaximumLength();
          directedGraph.setEdge(iStart, iFinish, maxdur);
          directedGraph.setEdge(iFinish, iStart, mindur.invertSign());
  
          Weight minstart = i.getSpecifiedMinimumStart();
          Weight maxstart = i.getSpecifiedMaximumStart();
          directedGraph.setEdge(timeZero, iStart, maxstart);
          directedGraph.setEdge(iStart, timeZero, minstart.invertSign());
  
          Weight minfinish = i.getSpecifiedMinimumFinish();
          Weight maxfinish = i.getSpecifiedMaximumFinish();
          directedGraph.setEdge(timeZero, iFinish, maxfinish);
          directedGraph.setEdge(iFinish, timeZero, minfinish.invertSign());
  
          calcMinDuration = null;
          calcMaxDuration = null;
          calcMinFinish = null;
          calcMaxFinish = null;
          calcMinStart = null;
          calcMaxStart = null;
          shortestDistancesFromTimeZeroSource = null;
          shortestDistancesFromTimeZeroDestination = null;
  
          return true;
      }
docs: Add an interval to this graph.
  
  @param i
  an interval.
  @return <code>true</code> if successful, <code>false</code> if the
  interval could not be added. If there was a problem adding the
  interval, then the constraint network may be in an inconsistent
  state (e.g., part of the interval got added).