Package org.pepstock.charba.client.data
Class TimeSeriesItem
- java.lang.Object
-
- org.pepstock.charba.client.commons.NativeObjectContainer
-
- org.pepstock.charba.client.data.AbstractDataPoint
-
- org.pepstock.charba.client.data.TimeSeriesItem
-
public final class TimeSeriesItem extends AbstractDataPoint
Default implementation for time series item interface in order to manage time series item (time and value).- Author:
- Andrea "Stock" Stocchero
- See Also:
DataPoint
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.pepstock.charba.client.data.AbstractDataPoint
AbstractDataPoint.CharbaProperty
-
-
Constructor Summary
Constructors Constructor Description TimeSeriesItem(Date time)
Creates a time series item setting the time passed as argument.TimeSeriesItem(Date time, double value)
Creates a time series item setting the time and the value passed as argument.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Date
getTime()
Returns the time of time series item.double
getValue()
Returns the value of time series item.void
setValue(double value)
Sets the value of time series item.-
Methods inherited from class org.pepstock.charba.client.data.AbstractDataPoint
checkAndSetType, getAttribute, getAttributeAsDate, getAttributeAsObject, getAttributeAsString, setAttribute, setAttribute, setAttribute, setAttribute
-
Methods inherited from class org.pepstock.charba.client.commons.NativeObjectContainer
checkDefaultValuesArgument, empty, getArrayValue, getElement, getIncrementalId, getNativeChart, getNativeEvent, getNativeObject, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValueForMultipleKeyTypes, getValueForMultipleKeyTypes, getValueForMultipleKeyTypes, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, has, has, isType, keys, loadNativeObject, remove, remove, setArrayValue, setArrayValue, setArrayValue, setElement, setEmptyValue, setNewIncrementalId, setNewIncrementalId, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, toJSON, type
-
-
-
-
Constructor Detail
-
TimeSeriesItem
public TimeSeriesItem(Date time)
Creates a time series item setting the time passed as argument. By default the value isDouble.NaN
.- Parameters:
time
- time of item
-
TimeSeriesItem
public TimeSeriesItem(Date time, double value)
Creates a time series item setting the time and the value passed as argument.- Parameters:
time
- time of itemvalue
- value of item
-
-
Method Detail
-
setValue
public void setValue(double value)
Sets the value of time series item.- Parameters:
value
- the value of time series item
-
getValue
public double getValue()
Returns the value of time series item.- Returns:
- the value of time series item
-
getTime
public Date getTime()
Returns the time of time series item.- Returns:
- the time of time series item
-
-