|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--net.agmodel.physical.GeneralSequenceImpl
|
+--net.agmodel.weatherData.GeneralMetSequenceImpl
|
+--net.agmodel.weatherData.RainImpl
Stores a sequence of rainfall totals.
| Field Summary |
| Fields inherited from class net.agmodel.weatherData.GeneralMetSequenceImpl |
rb |
| Fields inherited from class net.agmodel.physical.GeneralSequenceImpl |
dateRange, maximumTemporalInterpolation, summaryHistory |
| Constructor Summary | |
RainImpl(Interval dateRange,
SummaryHistory composition)
Creates a data sequence for an element. |
|
| Method Summary | |
JigsawQuantity |
getAverage(Interval interval)
Returns the average rainfall over the interval. |
String |
getContentsAsString(Date time,
String delimiter)
Returns the measurement associated with a particular time as a string. |
float[] |
getCoverage(int index)
Indicates which array elements returned by getData(int) are missing.
|
double[] |
getData(int index)
Creates a one-dimensional array containing one subcomponent of the data. |
JigsawQuantity |
getMaximum(Interval interval)
Returns the maximum rainfall over the interval. |
JigsawQuantity |
getMinimum(Interval interval)
Returns the minimum rainfall over the interval. |
int |
getNumberOfSubComponents()
Get the number of sub-components in the sequence. |
String |
getSubHeading(int index)
Returns the subheading by looking up the corresponding key in WeatherDataResources |
JigsawQuantity |
getTotal(Date time)
Returns the rainfall over the period preceding or including the time specified. |
JigsawQuantity |
getTotal(Interval interval)
Returns the total rainfall over the interval. |
void |
putRainfallOverInterval(Interval interval,
float value)
Records the rainfall over some subinterval. |
protected void |
setStore(Store newStore)
|
void |
setSubHeading(int index,
String aHeading)
Does nothing |
MetSequence |
summarize(Duration longerResolution)
Creates a lower resolution sequence which summarizes this sequence |
RainImpl |
total(Duration newResolution)
Creates a new rainfall sequence, totalling rainfall to a lower resolution. |
| Methods inherited from class net.agmodel.weatherData.GeneralMetSequenceImpl |
getColumnHeading, getName, getSequenceElement, getSequenceHeading, getUnitsHeading, setColumnHeading, setName, setSequenceHeading, setUnitsHeading |
| Methods inherited from class net.agmodel.physical.GeneralSequenceImpl |
cancelTemporalInterpolation, clone, dumpSequence, getAllCoverage, getAllData, getCurrentResolution, getDateRange, getMaximumTemporalInterpolation, getResolution, getSubHeading, getSummaryHistory, getSummaryKind, getTemporalInterpolation, getUnitsHeading, setTemporalInterpolation |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface net.agmodel.weatherData.MetSequence |
getSequenceElement |
| Methods inherited from interface net.agmodel.physical.CompoundSequence |
cancelTemporalInterpolation, getAllCoverage, getAllData, getMaximumTemporalInterpolation, getTemporalInterpolation, getUnitsHeading, setSequenceHeading, setTemporalInterpolation, setUnitsHeading |
| Methods inherited from interface net.agmodel.physical.Sequence |
clone, dumpSequence, getColumnHeading, getCurrentResolution, getDateRange, getName, getResolution, getSequenceHeading, getSubHeading, getSummaryKind, getUnitsHeading, setColumnHeading, setName |
| Constructor Detail |
public RainImpl(Interval dateRange,
SummaryHistory composition)
dateRange - the interval for which rainfall is storedcomposition - a record of how raw rainfall data has been summarised to make the sequence.| Method Detail |
public void putRainfallOverInterval(Interval interval,
float value)
interval - the period of time over which the measurement was taken.value - the rainfall over that interval
IllegalArgumentException - if the subinterval is outside the interval that the sequence was constructed to storepublic JigsawQuantity getMinimum(Interval interval)
Rain
getMinimum in interface Rainpublic JigsawQuantity getMaximum(Interval interval)
Rain
getMaximum in interface Rainpublic JigsawQuantity getAverage(Interval interval)
Rain
getAverage in interface Rainpublic JigsawQuantity getTotal(Interval interval)
Rain
getTotal in interface Rainpublic JigsawQuantity getTotal(Date time)
Rain
getTotal in interface Rainprotected void setStore(Store newStore)
public RainImpl total(Duration newResolution)
newResolution - the target resolution required.
public String getContentsAsString(Date time,
String delimiter)
Sequence
getContentsAsString in interface SequencegetContentsAsString in class GeneralSequenceImpltime - the time of interest.delimiter - a string to use between values if required.public MetSequence summarize(Duration longerResolution)
MetSequence
summarize in interface MetSequencelongerResolution - the new resolution to summarize to
public int getNumberOfSubComponents()
Sequence
getNumberOfSubComponents in interface SequencegetNumberOfSubComponents in class GeneralMetSequenceImplSequence.getSequenceHeading(String)public String getSubHeading(int index)
getSubHeading in interface CompoundSequencegetSubHeading in class GeneralMetSequenceImplSequence.getNumberOfSubComponents(),
Sequence.getSequenceHeading(String)
public void setSubHeading(int index,
String aHeading)
setSubHeading in interface CompoundSequencesetSubHeading in class GeneralMetSequenceImplaHeading - the new headingindex - the zero-based index of the headingSequence.getNumberOfSubComponents(),
Sequence.getSequenceHeading(String)public double[] getData(int index)
CompoundSequenceCompoundSequence.getCoverage(int) to test for missing values
(at present these are returned as Double.NaN but don't rely on this).
getData in interface CompoundSequencegetData in class GeneralSequenceImplindex - the zero-based index of the subcomponent
Sequence.getNumberOfSubComponents()public float[] getCoverage(int index)
CompoundSequenceCompoundSequence.getData(int) are missing.
Coverage values are in the range JigsawQuantity.DEVOID to JigsawQuantity.COMPLETE.
getCoverage in interface CompoundSequencegetCoverage in class GeneralSequenceImplindex - the zero-based index of the subcomponent
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||