private boolean currentGateLeadsToOtherStage ( final TraversalEntry te , final boolean forward ) { final ManagementGroupVertex groupVertex = te . getManagementVertex ( ) . getGroupVertex ( ) ; if ( forward ) { if ( te . getCurrentGate ( ) >= groupVertex . getNumberOfForwardEdges ( ) ) { return false ; } final ManagementGroupEdge edge = groupVertex . getForwardEdge ( te . getCurrentGate ( ) ) ; if ( edge . getTarget ( ) . getStageNumber ( ) == groupVertex . getStageNumber ( ) ) { return false ; } } else { if ( te . getCurrentGate ( ) >= groupVertex . getNumberOfBackwardEdges ( ) ) { return false ; } final ManagementGroupEdge edge = groupVertex . getBackwardEdge ( te . getCurrentGate ( ) ) ; if ( edge . getSource ( ) . getStageNumber ( ) == groupVertex . getStageNumber ( ) ) { return false ; } } return true ; }
Checks if the current gate leads to another stage or not .