com.isti.trinetwatch.collectionAgentSim
Class StationTable

java.lang.Object
  extended by com.isti.trinetwatch.collectionAgentSim.StationTable

public class StationTable
extends java.lang.Object

This class creates a data structure that holds a bunch of stations in a table.


Constructor Summary
StationTable()
          Creates an object of StationTable.
 
Method Summary
 boolean addStation(StationInfo station)
          Use this method to add a station to the station table.
 boolean addStation(java.lang.String stationName)
          Use this method to add a station to the station table.
 StationInfo get(java.lang.String stationName)
          Used to get a handle to a particular station.
 java.util.Enumeration getKeys()
          Use this method to get an enumeration of all the stations held in the station table.
 java.util.Enumeration getStationsEnum()
          Used to get an enumeration of all stations.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StationTable

public StationTable()
Creates an object of StationTable.

Method Detail

addStation

public boolean addStation(StationInfo station)
Use this method to add a station to the station table.

Parameters:
station - an object of StationInfo
Returns:
True if the station is added successfuly; false if the parameter is null, or the station already exists in the table.

addStation

public boolean addStation(java.lang.String stationName)
Use this method to add a station to the station table.

Parameters:
stationName - A string containing the name of the station.
Returns:
True if all is successful; false if the parameter is null or has length 0, or if the station already exists in the table.

get

public StationInfo get(java.lang.String stationName)
Used to get a handle to a particular station.

Parameters:
stationName - A string containing the name of the station whose handle is desired.
Returns:
A handle to the desired station of type StationInfo or null if a station with this name cannot be found.

getKeys

public java.util.Enumeration getKeys()
Use this method to get an enumeration of all the stations held in the station table.

Returns:
An enumeration of the names of all the stations in the station table.

getStationsEnum

public java.util.Enumeration getStationsEnum()
Used to get an enumeration of all stations.

Returns:
An enumeration of all the stations.