public class StationTableImpl extends java.lang.Object implements StationTable
| Modifier and Type | Field and Description | 
|---|---|
protected java.util.Map | 
byId_
Map of stations 
 | 
protected java.util.List | 
stations  | 
| Constructor and Description | 
|---|
StationTableImpl()
Create a new StationTableImpl 
 | 
| Modifier and Type | Method and Description | 
|---|---|
boolean | 
add(Station stn)
Add a station to the table 
 | 
boolean | 
add(Station stn,
   boolean onlyIfNotInMap)
Add a station to the table 
 | 
Station | 
get(java.lang.String identifier)
Lookup Station by Identifier 
 | 
protected java.util.Map | 
getMap()
Have this method here so derived classes know when anything was
 requested of this station table. 
 | 
java.util.Set | 
keySet()
Returns the set of identifiers 
 | 
Station | 
remove(Station stn)
Remove a station from the table 
 | 
Station | 
remove(java.lang.String id)
Remove a station from the table by it's id 
 | 
int | 
size()
Returns the number of stations in this table 
 | 
java.util.Collection | 
values()
Returns a collection view of the Station values
 contained in this table. 
 | 
protected java.util.List stations
protected final java.util.Map byId_
protected java.util.Map getMap()
public boolean add(Station stn)
stn - station to addpublic boolean add(Station stn, boolean onlyIfNotInMap)
stn - station to addonlyIfNotInMap - public Station remove(Station stn)
stn - station to removepublic Station remove(java.lang.String id)
id - station identifierpublic Station get(java.lang.String identifier)
get in interface StationTableidentifier - the station identifierpublic java.util.Set keySet()
keySet in interface StationTablepublic int size()
size in interface StationTablepublic java.util.Collection values()
values in interface StationTable