com.isti.trinetwatch.emailer
Class StationDataTable

java.lang.Object
  extended bycom.isti.trinetwatch.emailer.StationDataTable

public class StationDataTable
extends java.lang.Object

Class StationDataTable defines a table of station information blocks.


Constructor Summary
StationDataTable()
           
 
Method Summary
 boolean add(StationDataBlock sBlock)
          Adds the given StationDataBlock to the table.
 void clear()
          Removes all station information blocks contained in the table.
 boolean containsKey(java.lang.String name)
          Returns true if an object matching the given name exists in the table.
 java.util.Enumeration elements()
          Returns an enumeration of the station information blocks contained in the table.
 StationDataBlock get(java.lang.String name)
          Returns the 'StationDataBlock' object matching the given name, or null if no matching object is found.
 java.lang.String getDisplayString()
          Returns a display string for the table.
 StationDataBlock remove(StationDataBlock sBlock)
          Removes the given 'StationDataBlock' object.
 StationDataBlock remove(java.lang.String name)
          Removes the 'StationDataBlock' object matching the given name.
 int size()
          Returns the number of station information blocks contained in the table.
 boolean update(java.lang.String name, StatusLevelTag statusLevel, UsageLevelTag usageLevel, long timeVal)
          Updates the status and usage levels associated with the given station name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StationDataTable

public StationDataTable()
Method Detail

update

public boolean update(java.lang.String name,
                      StatusLevelTag statusLevel,
                      UsageLevelTag usageLevel,
                      long timeVal)
Updates the status and usage levels associated with the given station name. If the given station name does exist in the table then a new 'StationDataBlock' object is created and added to the table.

Parameters:
name - station name.
statusLevel - status level for station.
usageLevel - usage level for station.
timeVal - time value for this update.
Returns:
true if the status or usage level tag for the station is changed, false if not or if a parameter error is detected.

add

public boolean add(StationDataBlock sBlock)
Adds the given StationDataBlock to the table.

Returns:
true if successful, false if a parameter error is detected or if a StationDataBlock with the same name already exists in the table.

get

public StationDataBlock get(java.lang.String name)
Returns the 'StationDataBlock' object matching the given name, or null if no matching object is found.


remove

public StationDataBlock remove(java.lang.String name)
Removes the 'StationDataBlock' object matching the given name.

Returns:
the 'StationDataBlock' object that was removed or null if no matching object was found.

remove

public StationDataBlock remove(StationDataBlock sBlock)
Removes the given 'StationDataBlock' object.

Returns:
the 'StationDataBlock' object that was removed or null if no matching object was found.

containsKey

public boolean containsKey(java.lang.String name)
Returns true if an object matching the given name exists in the table.


elements

public java.util.Enumeration elements()
Returns an enumeration of the station information blocks contained in the table.


size

public int size()
Returns the number of station information blocks contained in the table.


clear

public void clear()
Removes all station information blocks contained in the table.


getDisplayString

public java.lang.String getDisplayString()
Returns a display string for the table. Each station information block in the table is put on a separate line.