jfreerails.controller
Class VerifyStationName

java.lang.Object
  extended by jfreerails.controller.VerifyStationName

public class VerifyStationName
extends java.lang.Object

Class to verify that the chosen name for a station hasn't already been taken by another station. If the name has been used, a minor alteration in the name is required, by adding perhaps "Junction" or "Siding" to the name.

Author:
Scott Bennett Date: 12th April 2003

Field Summary
private  java.lang.String nameToVerify
           
private  java.util.Vector<java.lang.String> stationAlternatives
           
private  ReadOnlyWorld w
           
 
Constructor Summary
VerifyStationName(ReadOnlyWorld world, java.lang.String name)
           
 
Method Summary
private  boolean checkStationExists(java.lang.String name)
           
 java.lang.String getName()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

w

private final ReadOnlyWorld w

nameToVerify

private final java.lang.String nameToVerify

stationAlternatives

private final java.util.Vector<java.lang.String> stationAlternatives
Constructor Detail

VerifyStationName

public VerifyStationName(ReadOnlyWorld world,
                         java.lang.String name)
Method Detail

getName

public java.lang.String getName()

checkStationExists

private boolean checkStationExists(java.lang.String name)