|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--net.agmodel.physical.DataSetImpl
A serializable implementation of DataSet which uses a HashMap to store Sequences.
| Field Summary | |
protected Interval |
interval
|
protected Duration |
resolution
|
protected Map |
sequences
|
| Constructor Summary | |
DataSetImpl(Interval interval,
Duration resolution)
|
|
| Method Summary | |
void |
addSequence(Object key,
Sequence sequenceToAdd)
|
String |
dumpDuration(DateFormat df,
String delimiter,
String rowTerminator,
String timeHeader,
String noData)
Returns a string representation of the entire data set |
Interval |
getInterval()
Gets the interval covered by the data set |
int |
getNumberOfRows()
Gets the number of rows of data based on the data set's duration and resolution |
int |
getNumberOfSequences()
Gets the number of data sequences |
Duration |
getResolution()
Gets the resolution of the station data set |
Sequence |
getSequence(Object key)
Gets the data, if it exists, for a particular weather element. |
protected Sequence[] |
getSequenceArray()
Returns the sequences as a list (used in dumpDuration) May be overridden by descendant classes to order the output of dumpDuration. |
String |
toString()
Returns a basic string representation of data set (without the actual data). |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected Map sequences
protected Interval interval
protected Duration resolution
| Constructor Detail |
public DataSetImpl(Interval interval,
Duration resolution)
| Method Detail |
public void addSequence(Object key,
Sequence sequenceToAdd)
public Sequence getSequence(Object key)
getSequence in interface DataSetkey - an identifier for the required sequence.
public String toString()
dumpDuration(java.text.DateFormat, java.lang.String, java.lang.String, java.lang.String, java.lang.String) for data output.
toString in class Objectpublic Interval getInterval()
DataSet
getInterval in interface DataSetpublic Duration getResolution()
getResolution in interface DataSetpublic int getNumberOfRows()
getNumberOfRows in interface DataSetpublic int getNumberOfSequences()
getNumberOfSequences in interface DataSetprotected Sequence[] getSequenceArray()
public String dumpDuration(DateFormat df,
String delimiter,
String rowTerminator,
String timeHeader,
String noData)
DataSet
dumpDuration in interface DataSetdf - a DateFormat to use for the dates and timesdelimiter - the delimiter to put between the data itemsrowTerminator - the string to use at the end of each rowtimeHeader - a string to head the date/time columnnoData - a string to show when there is no data
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||