net.agmodel.weatherData
Class ScalarMaxMinImpl

java.lang.Object
  extended bynet.agmodel.physical.GeneralSequenceImpl
      extended bynet.agmodel.weatherData.GeneralMetSequenceImpl
          extended bynet.agmodel.weatherData.ScalarMaxMinImpl
All Implemented Interfaces:
Cloneable, CompoundSequence, MetSequence, Sequence, Serializable
Direct Known Subclasses:
AirTempMaxMinImpl, ScalarMaxMinMeanImpl

public abstract class ScalarMaxMinImpl
extends GeneralMetSequenceImpl

Manages a pair of maximum and minimum temperature sequences

Author:
Matthew Laurenson
See Also:
Serialized Form

Method Summary
 Object clone()
           
 JigsawQuantity getAverage(Interval interval)
          Returns the value midway between the maximum and minimum
 String getColumnHeading()
          Returned a localized label for the Sequence
 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)
          Will estimates the temperature at a point in time Currently just returns the average temperature
 JigsawQuantity getInstantMaximum(Date time)
          Gets the maximum temperature in the sequence over an interval
 JigsawQuantity getInstantMinimum(Date time)
          Gets the minimum temperature in the sequence over an interval
 JigsawQuantity getMaximum(Interval interval)
          Gets the maximum temperature into the sequence based on an interval
 double getMeasurementHeight()
           
 JigsawQuantity getMinimum(Interval interval)
          Gets the minimum temperature into the sequence based on an interval
 int getNumberOfSubComponents()
          Get the number of sub-components in the sequence.
 String getSubHeading(int index)
          Gets a brief description of the data stored in a Sequence subcomponent in the language of the default locale.
 void putMax(Date time, float maximum)
          Puts the maximum value into the sequence.
 void putMaxMin(Date time, float maximum, float minimum)
          Puts a maximum, minimum temperature pair into the sequence.
 void putMaxMinOverInterval(Interval interval, float maximum, float minimum)
          Puts a maximum, minimum value pair into the sequence based on an interval
 void putMaxOverInterval(Interval interval, float maximum)
          Puts the maximum temperature into the sequence based on an interval
 void putMin(Date time, float minimum)
          Puts the minimum value into the sequence.
 void putMinOverInterval(Interval interval, float minimum)
          Puts the minimum temperature into the sequence based on an interval
 void setSubHeading(int index, String aHeading)
          Does nothing
 
Methods inherited from class net.agmodel.weatherData.GeneralMetSequenceImpl
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, 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
 

Method Detail

putMaxMin

public void putMaxMin(Date time,
                      float maximum,
                      float minimum)
Puts a maximum, minimum temperature pair into the sequence.

Parameters:
time - the ending time of the interval over which the measurement was made
maximum - the maximum temperature in the period preceding this time
minimum - the minimum temperature in the period preceding this time

putMaxMinOverInterval

public void putMaxMinOverInterval(Interval interval,
                                  float maximum,
                                  float minimum)
Puts a maximum, minimum value pair into the sequence based on an interval

Parameters:
interval - the interval over which the maximum and minimum were recorded
maximum - the maximum value in the period preceding this time
minimum - the minimum value in the period preceding this time

putMax

public void putMax(Date time,
                   float maximum)
Puts the maximum value into the sequence.

Parameters:
time - the ending time of the interval over which the measurement was made.
maximum - the maximum value in the period preceding this time

putMin

public void putMin(Date time,
                   float minimum)
Puts the minimum value into the sequence.

Parameters:
time - the ending time of the interval over which the measurement was made.
minimum - the minimum value in the period preceding this time

putMaxOverInterval

public void putMaxOverInterval(Interval interval,
                               float maximum)
Puts the maximum temperature into the sequence based on an interval

Parameters:
interval - the interval over which the maximum was recorded
maximum - the maximum temperature during the interval

putMinOverInterval

public void putMinOverInterval(Interval interval,
                               float minimum)
Puts the minimum temperature into the sequence based on an interval

Parameters:
interval - the interval over which the minimum was recorded
minimum - the minimum temperature during the interval

getMaximum

public JigsawQuantity getMaximum(Interval interval)
Gets the maximum temperature into the sequence based on an interval

Parameters:
interval - the interval of interest
Returns:
the maximum temperature during the interval

getMinimum

public JigsawQuantity getMinimum(Interval interval)
Gets the minimum temperature into the sequence based on an interval

Parameters:
interval - the interval of interest
Returns:
the minimum temperature during the interval

getInstantMaximum

public JigsawQuantity getInstantMaximum(Date time)
Gets the maximum temperature in the sequence over an interval

Parameters:
time - the ending time of the interval of interest.
Returns:
the maximum temperature of the period preceding the time.

getInstantMinimum

public JigsawQuantity getInstantMinimum(Date time)
Gets the minimum temperature in the sequence over an interval

Parameters:
time - the ending time of the interval of interest.
Returns:
the minimum temperature of the period preceding the time.

getAverage

public JigsawQuantity getAverage(Interval interval)
Returns the value midway between the maximum and minimum

Parameters:
interval - the interval of interest
Returns:
the average temperature during the interval

getInstant

public JigsawQuantity getInstant(Date time)
Will estimates the temperature at a point in time Currently just returns the average temperature

Parameters:
time - the time of interest
Returns:
the estimated temperature at the time

getColumnHeading

public String getColumnHeading()
Deprecated.  

Description copied from interface: Sequence
Returned a localized label for the Sequence

Specified by:
getColumnHeading in interface Sequence
Overrides:
getColumnHeading in class GeneralMetSequenceImpl

getNumberOfSubComponents

public int getNumberOfSubComponents()
Description copied from interface: Sequence
Get the number of sub-components in the sequence. This indicates how many "columns" the sequence output will occupy.

Specified by:
getNumberOfSubComponents in interface Sequence
Specified by:
getNumberOfSubComponents in class GeneralMetSequenceImpl

getSubHeading

public String getSubHeading(int index)
Description copied from interface: CompoundSequence
Gets a brief description of the data stored in a Sequence subcomponent in the language of the default locale. This value can be used as a column sub heading if the sequence is listed. It is assumed to be in the context of an overall column heading.

Specified by:
getSubHeading in interface CompoundSequence
Specified by:
getSubHeading in class GeneralMetSequenceImpl

setSubHeading

public void setSubHeading(int index,
                          String aHeading)
Does nothing

Specified by:
setSubHeading in interface CompoundSequence
Specified by:
setSubHeading in class GeneralMetSequenceImpl

getContentsAsString

public String getContentsAsString(Date time,
                                  String delimiter)
Description copied from interface: Sequence
Returns the measurement associated with a particular time as a string. Used by dumpSequence.

Specified by:
getContentsAsString in interface Sequence
Specified by:
getContentsAsString in class GeneralSequenceImpl

getMeasurementHeight

public double getMeasurementHeight()

getData

public double[] getData(int index)
Description copied from interface: CompoundSequence
Creates a one-dimensional array containing one subcomponent of the data. Use CompoundSequence.getCoverage(int) to test for missing values (at present these are returned as Double.NaN but don't rely on this).
Note that the first element of the array corresponds to getStart() and is therefore empty in most cases.

Specified by:
getData in interface CompoundSequence
Specified by:
getData in class GeneralSequenceImpl

getCoverage

public float[] getCoverage(int index)
Description copied from interface: CompoundSequence
Indicates which array elements returned by CompoundSequence.getData(int) are missing. Coverage values are in the range JigsawQuantity.DEVOID to JigsawQuantity.COMPLETE.
Note that the first element of the array corresponds to getStart() and is therefore empty in most cases.

Specified by:
getCoverage in interface CompoundSequence
Specified by:
getCoverage in class GeneralSequenceImpl

clone

public Object clone()
Specified by:
clone in interface Sequence
Overrides:
clone in class GeneralSequenceImpl


Copyright (C) NARC 2001 All Rights Reserved.