public void removeAllRoadSegments ( ) { for ( final BusItineraryHalt halt : this . invalidHalts ) { halt . setRoadSegmentIndex ( - 1 ) ; halt . setPositionOnSegment ( Float . NaN ) ; halt . checkPrimitiveValidity ( ) ; } final BusItineraryHalt [ ] halts = new BusItineraryHalt [ this . validHalts . size ( ) ] ; this . validHalts . toArray ( halts ) ; for ( final BusItineraryHalt halt : halts ) { halt . setRoadSegmentIndex ( - 1 ) ; halt . setPositionOnSegment ( Float . NaN ) ; halt . checkPrimitiveValidity ( ) ; } if ( this . roadNetwork != null ) { final RoadNetwork network = this . roadNetwork . get ( ) ; if ( network != null ) { network . removeRoadNetworkListener ( this ) ; } this . roadNetwork = null ; } this . roadSegments . clear ( ) ; fireShapeChanged ( new BusChangeEvent ( this , BusChangeEventType . ALL_SEGMENTS_REMOVED , null , - 1 , "shape" , //$NON-NLS-1$ null , null ) ) ; checkPrimitiveValidity ( ) ; }
Remove all the road segments from the current itinerary .