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;
}

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 ; }
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 .
