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 ; }
Add an interval to this graph .