net.degreedays.api.data
Class TimeSeriesInterval

java.lang.Object
  extended by net.degreedays.api.data.TimeSeriesInterval
All Implemented Interfaces:
java.io.Serializable

public final class TimeSeriesInterval
extends java.lang.Object
implements java.io.Serializable

Defines the interval (e.g. hourly) that time-series data should be calculated with.

Since:
1.2

Instances of this class are immutable, and you can safely use them from multiple threads at once. The only instances that can exist are those declared as static constants, so you can use == to check for equality.


Field Summary
static TimeSeriesInterval HOURLY
          For regular hourly time-series data i.e. readings on the hour every hour.
 
Method Summary
static TimeSeriesInterval fromString(java.lang.String name)
          Returns the non-null TimeSeriesInterval object with the specified name (returned by its toString() method).
 java.lang.String toString()
          Returns a non-null, non-empty string representation of this object in the format required by the request XML (e.g. "Hourly").
static TimeSeriesInterval[] values()
          Returns an array of the available TimeSeriesInterval values.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

HOURLY

public static final TimeSeriesInterval HOURLY
For regular hourly time-series data i.e. readings on the hour every hour.

Method Detail

toString

public java.lang.String toString()
Returns a non-null, non-empty string representation of this object in the format required by the request XML (e.g. "Hourly").

Overrides:
toString in class java.lang.Object

values

public static TimeSeriesInterval[] values()
Returns an array of the available TimeSeriesInterval values.

The returned array can be modified freely without affecting the arrays returned by past, concurrent, or future calls to this method.


fromString

public static TimeSeriesInterval fromString(java.lang.String name)
Returns the non-null TimeSeriesInterval object with the specified name (returned by its toString() method).

Throws:
java.lang.NullPointerException - if name is null.
java.lang.IllegalArgumentException - if name is not "Hourly" (as at present HOURLY is the only TimeSeriesInterval).


www.degreedays.net/api/