org.opengts.util
Class TemperatureSet

java.lang.Object
  extended by org.opengts.util.TemperatureSet

public class TemperatureSet
extends java.lang.Object

Temperature container


Constructor Summary
TemperatureSet()
          Constructor
TemperatureSet(java.lang.String label)
          Constructor
TemperatureSet(java.lang.String label, java.util.Collection<Temperature> TList)
          Constructor
TemperatureSet(java.lang.String label, Temperature[] TList)
          Constructor
 
Method Summary
 boolean addTemperature(long ts, double C)
          Adds the specified temperature to this data set
 boolean addTemperature(Temperature T)
          Adds the specified temperature to this data set
static java.lang.String CreateGoogleDataTableJavaScript(boolean F, TemperatureSet... TSList)
          Creates a Google DataTable containing the specified TemperatureSet Data
 java.lang.String getLabel(java.lang.String dft)
          Gets the temperature data set label
 double getMaximumTemperature()
          Get maximum Temperature
 double getMinimumTemperature()
          Get minimum Temperature
 int getSize()
          Get size of TemperatureSet
 java.util.Collection<Temperature> getTemperatures()
          Gets the temperature data set
static void main(java.lang.String[] argv)
           
 void setLabel(java.lang.String label)
          Sets the temperature data set label
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TemperatureSet

public TemperatureSet()
Constructor


TemperatureSet

public TemperatureSet(java.lang.String label)
Constructor


TemperatureSet

public TemperatureSet(java.lang.String label,
                      Temperature[] TList)
Constructor


TemperatureSet

public TemperatureSet(java.lang.String label,
                      java.util.Collection<Temperature> TList)
Constructor

Method Detail

CreateGoogleDataTableJavaScript

public static java.lang.String CreateGoogleDataTableJavaScript(boolean F,
                                                               TemperatureSet... TSList)
Creates a Google DataTable containing the specified TemperatureSet Data

Parameters:
F - True for Fahrenheit, false for Celsius
TSList - The TemperatureSet data array
Returns:
The "DataTable" String.

setLabel

public void setLabel(java.lang.String label)
Sets the temperature data set label


getLabel

public java.lang.String getLabel(java.lang.String dft)
Gets the temperature data set label


addTemperature

public boolean addTemperature(long ts,
                              double C)
Adds the specified temperature to this data set

Parameters:
ts - The timestamp (in seconds)
C - The temperature (in Celsius)

addTemperature

public boolean addTemperature(Temperature T)
Adds the specified temperature to this data set


getMinimumTemperature

public double getMinimumTemperature()
Get minimum Temperature


getMaximumTemperature

public double getMaximumTemperature()
Get maximum Temperature


getSize

public int getSize()
Get size of TemperatureSet


getTemperatures

public java.util.Collection<Temperature> getTemperatures()
Gets the temperature data set


main

public static void main(java.lang.String[] argv)