|
||||||||||
| 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.ScalarImpl
Manages a sequence of scalar values.
| Field Summary | |
protected float |
measurementHeight
|
protected Store |
store
|
| Fields inherited from class net.agmodel.weatherData.GeneralMetSequenceImpl |
rb |
| Fields inherited from class net.agmodel.physical.GeneralSequenceImpl |
dateRange, maximumTemporalInterpolation, summaryHistory |
| Constructor Summary | |
ScalarImpl(MetElement element,
Interval dateRange,
SummaryHistory composition,
double measurementHeight,
String label)
Creates a scalar sequence. |
|
ScalarImpl(MetElement element,
Interval dateRange,
SummaryHistory composition,
String label)
Creates a scalar sequence. |
|
| Method Summary | |
Object |
clone()
|
JigsawQuantity |
getAverage(Interval interval)
Returns the average temperature 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 |
getInstant(Date time)
Returns the instantaneous value at a particular point in time. |
JigsawQuantity |
getMaximum(Interval interval)
Returns the maximum value over the interval. |
double |
getMeasurementHeight()
|
JigsawQuantity |
getMinimum(Interval interval)
Returns the minimum value 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 |
void |
putInstantValue(Date time,
float value)
Records the instantaneous value at a particular time |
void |
putValueOverInterval(Interval interval,
float value)
Records the average value over some subinterval. |
protected void |
setStore(Store newStore)
|
void |
setSubHeading(int index,
String aHeading)
Does nothing |
| 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, 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 |
summarize |
| Methods inherited from interface net.agmodel.physical.CompoundSequence |
cancelTemporalInterpolation, getAllCoverage, getAllData, getMaximumTemporalInterpolation, getTemporalInterpolation, setTemporalInterpolation |
| Methods inherited from interface net.agmodel.physical.Sequence |
dumpSequence, getCurrentResolution, getDateRange, getResolution, getSubHeading, getSummaryKind, getUnitsHeading |
| Field Detail |
protected float measurementHeight
protected Store store
| Constructor Detail |
public ScalarImpl(MetElement element,
Interval dateRange,
SummaryHistory composition,
double measurementHeight,
String label)
dateRange - the interval for which values are storedcomposition - a record of how raw data has been summarised to make the sequence.measurementHeight - the height in metres;
public ScalarImpl(MetElement element,
Interval dateRange,
SummaryHistory composition,
String label)
default height for temperature measurements.
dateRange - the interval for which values are storedcomposition - a record of how raw data has been summarised to make the sequence.| Method Detail |
public void putInstantValue(Date time,
float value)
time - the point in timevalue - the value at that time
IllegalArgumentException - if the time is outside the interval that the period is intended to store
public void putValueOverInterval(Interval interval,
float value)
interval - the period of time over which the measurement was taken.value - the average value over that interval
IllegalArgumentException - if the subinterval is outside the interval that the sequence was constructed to storepublic JigsawQuantity getMinimum(Interval interval)
public JigsawQuantity getMaximum(Interval interval)
public JigsawQuantity getInstant(Date time)
public JigsawQuantity getAverage(Interval interval)
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.protected void setStore(Store newStore)
public double getMeasurementHeight()
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
public Object clone()
clone in interface Sequenceclone in class GeneralSequenceImpl
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||