public class GroupTable extends java.lang.Object implements GroupTableInfo
| Constructor and Description |
|---|
GroupTable()
Creates a manager for a table of stations groups.
|
GroupTable(StationTable mainStationsTable)
Creates a manager for a table of stations groups.
|
| Modifier and Type | Method and Description |
|---|---|
int |
add(Station stationObj,
java.lang.String groupName)
Adds the given Station object to the given group.
|
boolean |
add(java.lang.String groupName,
StationTable sTable)
Adds a new group of stations to the table.
|
boolean |
containsKey(java.lang.String groupName)
Tests if the specified group name exists in the table.
|
java.util.Enumeration |
elements()
Returns an enumeration of the 'StationTable' objects in the table.
|
void |
enterTableData(GroupTable srcGroupTableObj,
StationTable mainStationsTable)
Enters the data from the given table into this table.
|
StationTable |
get(java.lang.String groupName)
Returns the StationTable associated with the given group name.
|
java.lang.String |
getDisplayString()
Returns a display string containing information about all the
groups in the table, with each group on a separate line.
|
java.lang.String |
getGroupDisplayString(java.lang.String groupName)
Returns a display string containing the name of each station in
the specified group.
|
java.util.Vector |
getKeysVector()
Returns a Vector of group name keys.
|
java.lang.String |
getStationsString(int compCode,
java.lang.String groupName)
Returns a String of names of stations associated with the given
group name, via the given comparison code.
|
StationTable |
getStationsTable(int compCode,
java.lang.String groupName)
Returns the StationTable associated with the given group name, via
the given comparison code.
|
java.lang.Object |
getThreadSyncObj()
Returns the thread-synchronization object for this table.
|
int |
groupCount()
Returns a count of the number of group name keys in the table.
|
java.util.Enumeration |
groupElements(java.lang.String groupName)
Returns an enumeration of Station objects for the specified group.
|
java.util.Enumeration |
groupKeys(java.lang.String groupName)
Returns an enumeration of Station name keys for the specified group.
|
java.util.Enumeration |
keys()
Returns an enumeration of group name keys.
|
void |
setMainStationsTable(StationTable mainStationsTable)
Enters the "main" table of all stations for server.
|
java.lang.String |
toString()
Returns a string representation of this object.
|
public GroupTable()
public GroupTable(StationTable mainStationsTable)
mainStationsTable - "main" table of all stations for server.public void setMainStationsTable(StationTable mainStationsTable)
mainStationsTable - "main" table of all stations for server.public int add(Station stationObj, java.lang.String groupName)
stationObj - the station object to be added.groupName - the name of the group to add to or create.public boolean add(java.lang.String groupName,
StationTable sTable)
groupName - the name of the group to add.sTable - the table of stations to be associated with the
given group name.public java.lang.Object getThreadSyncObj()
public void enterTableData(GroupTable srcGroupTableObj, StationTable mainStationsTable)
srcGroupTableObj - source table to read from.mainStationsTable - "main" stations table (containing the actual
station objects rather than copies).public StationTable get(java.lang.String groupName)
groupName - name of the group to get.public StationTable getStationsTable(int compCode, java.lang.String groupName)
getStationsTable in interface GroupTableInfocompCode - the comparison code associated with the group name
(one of the GUIServicesDefines "PROP_CODE_..." values).groupName - name of the group to get.public java.lang.String getStationsString(int compCode,
java.lang.String groupName)
getStationsString in interface GroupTableInfocompCode - the comparison code associated with the group name
(one of the GUIServicesDefines "PROP_CODE_..." values).groupName - name of the group to get.public boolean containsKey(java.lang.String groupName)
groupName - the name of the group to test.public java.util.Enumeration keys()
keys in interface GroupTableInfopublic java.util.Vector getKeysVector()
public java.util.Enumeration elements()
elements in interface GroupTableInfopublic int groupCount()
public java.util.Enumeration groupKeys(java.lang.String groupName)
groupName - the name of the group.public java.util.Enumeration groupElements(java.lang.String groupName)
groupName - the name of the group.public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String getGroupDisplayString(java.lang.String groupName)
groupName - the name of the group.public java.lang.String getDisplayString()