question: public boolean isLocalSwitcher ( ) { String departureName = TrainCommon . splitString ( getTrainDepartsName ( ) ) ; Route route = getRoute ( ) ; if ( route != null ) { for ( RouteLocation rl : route . getLocationsBySequenceList ( ) ) { String name = TrainCommon . splitString ( rl . getName ( ) ) ; if ( ! departureName . equals ( name ) ) { return false ; } } } return true ; }
target:  Used to determine if train is a local switcher serving one location. Note the the train can have more than location in its route, but all location names must be "same". See TrainCommon.splitString(String name) for the definition of the "same" name.