|
||||||||||
| 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.SunshineImpl
Stores a sequence of sunshine 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 | |
SunshineImpl(Interval dateRange,
SummaryHistory composition)
Creates a data sequence for an element. |
|
| Method Summary | |
JigsawQuantity |
getAverage(Interval interval)
Returns the average hours of sunshine 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 sunshine hours over the interval. |
JigsawQuantity |
getMinimum(Interval interval)
Returns the minimum hours of sunlight 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 sunshine over the period preceding and including the time specified. |
JigsawQuantity |
getTotal(Interval interval)
Returns the total sunshine hours over the interval. |
void |
putSunshineHoursOverInterval(Interval interval,
float value)
Records the sunshine hours 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 |
SunshineImpl |
total(Duration newResolution)
Creates a new sunshine hours sequence, totalling sunshine hours 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 SunshineImpl(Interval dateRange,
SummaryHistory composition)
dateRange - the interval for which sunshine hours are storedcomposition - a record of how raw sunshine hours data has been summarised to make the sequence.| Method Detail |
public void putSunshineHoursOverInterval(Interval interval,
float value)
interval - the period of time over which the measurement was taken.value - the sunshine hours over that interval
IllegalArgumentException - if the subinterval is outside the interval that the sequence was constructed to storepublic JigsawQuantity getMinimum(Interval interval)
Sunshine
getMinimum in interface Sunshinepublic JigsawQuantity getMaximum(Interval interval)
Sunshine
getMaximum in interface Sunshinepublic JigsawQuantity getAverage(Interval interval)
Sunshine
getAverage in interface Sunshinepublic JigsawQuantity getTotal(Interval interval)
Sunshine
getTotal in interface Sunshinepublic JigsawQuantity getTotal(Date time)
Sunshine
getTotal in interface Sunshineprotected void setStore(Store newStore)
public SunshineImpl 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 | |||||||||