|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public static interface FioData.DataPoint
Data access interface that accepts a forecast.io property name
or a WeatherProperty object. This is roughly a
Data Point object described by forecast.io.
| Method Summary | ||
|---|---|---|
|
get(WeatherProperty<T> property)
Gets the data represented by a weather property. |
|
|
getProperty(java.lang.String name,
java.lang.Class<T> klass)
Gets the property value of an expected data type. |
|
|
getStandardDeviation(WeatherProperty<T> property)
Gets the variability of the data from which a property value is calculated. |
|
| Method Detail |
|---|
<T> T getProperty(java.lang.String name,
java.lang.Class<T> klass)
T - the type of the dataname - the name of the propertyklass - the class object of the expected data type
java.lang.ClassCastException - if the data cannot be converted into
the expected data type<T> T get(WeatherProperty<T> property)
WeatherPropertyMap
get in interface WeatherPropertyMapT - the type of the dataproperty - the property for which the data is to be returned
null
if no data is available or if the given property is not
supported<T> T getStandardDeviation(WeatherProperty<T> property)
WeatherPropertyMapget(WeatherProperty)
is the average of all data collected, then the value returned by this
method shows how much variation or dispersion exists from the average.
Smaller variation implies higher confidence statistically.
Implementation note: While this method in general is only
applicable to numeric property values, the standard deviation does not
have to be an instance of java.lang.Number. The return
object however must have the same type as that of the property value.
When the comparison between the standard deviation
(returned by this method) and the mean (returned by
get(WeatherProperty)) is not obvious, a helper method may
be provided to illustrate the confidence level in other ways such as the
coefficient of variation in percentages.
getStandardDeviation in interface WeatherPropertyMapT - the data type of the property valueproperty - the property for which the data variability is to be
returned
null if such information is unavailable
or the given property is not supportedWeatherPropertyMap.get(WeatherProperty)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||