Package ucar.unidata.metdata
Class StationTableImpl
java.lang.Object
ucar.unidata.metdata.StationTableImpl
- All Implemented Interfaces:
- StationTable
- Direct Known Subclasses:
- NamedStationTable
Table of reporting stations.
 
- Version:
- $Revision: 1.11 $ $Date: 2006/08/18 21:31:58 $
- Author:
- $Author: jeffmc $
- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbooleanAdd a station to the tablebooleanAdd a station to the tableLookup Station by Identifierprotected MapgetMap()Have this method here so derived classes know when anything was requested of this station table.keySet()Returns the set of identifiersRemove a station from the table by it's idRemove a station from the tableintsize()Returns the number of stations in this tablevalues()Returns a collection view of the Station values contained in this table.
- 
Field Details- 
stations
- 
byId_Map of stations
 
- 
- 
Constructor Details- 
StationTableImplpublic StationTableImpl()Create a new StationTableImpl
 
- 
- 
Method Details- 
getMapHave this method here so derived classes know when anything was requested of this station table. This allows them to lazily create the stations, etc.- Returns:
- station map
 
- 
addAdd a station to the table- Parameters:
- stn- station to add
- Returns:
- true if the station was not already in the table
 
- 
addAdd a station to the table- Parameters:
- stn- station to add
- onlyIfNotInMap-
- Returns:
- true if the station was not already in the table
 
- 
removeRemove a station from the table- Parameters:
- stn- station to remove
- Returns:
- the station being removed or null if it is not in the table
 
- 
removeRemove a station from the table by it's id- Parameters:
- id- station identifier
- Returns:
- station mapped to the id, or null if none
 
- 
getLookup Station by Identifier- Specified by:
- getin interface- StationTable
- Parameters:
- identifier- the station identifier
- Returns:
- the station in the table
 
- 
keySetReturns the set of identifiers- Specified by:
- keySetin interface- StationTable
- Returns:
- Set of identifiers
 
- 
sizepublic int size()Returns the number of stations in this table- Specified by:
- sizein interface- StationTable
- Returns:
- number of stations in the table
 
- 
valuesReturns a collection view of the Station values contained in this table.- Specified by:
- valuesin interface- StationTable
- Returns:
- the collection of stations
 
 
-