public Train newTrain(String name){
  Train train=getTrainByName(name);
  if (train == null) {
    _id++;
    train=new Train(Integer.toString(_id),name);
    Integer oldSize=Integer.valueOf(_trainHashTable.size());
    _trainHashTable.put(train.getId(),train);
    setDirtyAndFirePropertyChange(LISTLENGTH_CHANGED_PROPERTY,oldSize,Integer.valueOf(_trainHashTable.size()));
  }
  return train;
}

public Train newTrain ( String name ) { Train train = getTrainByName ( name ) ; if ( train == null ) { _id ++ ; train = new Train ( Integer . toString ( _id ) , name ) ; Integer oldSize = Integer . valueOf ( _trainHashTable . size ( ) ) ; _trainHashTable . put ( train . getId ( ) , train ) ; setDirtyAndFirePropertyChange ( LISTLENGTH_CHANGED_PROPERTY , oldSize , Integer . valueOf ( _trainHashTable . size ( ) ) ) ; } return train ; }
finds an existing train or creates a new train if needed requires train ' s name creates a unique id for this train
