LocalDataPoint

public final classLocalDataPointextendsObject

Represents a single data point in aLocalDataType's stream. A data point holds a value for each field and a time interval. The exact semantics of each of these attributes is specified in the documentation for the particular data type, which can be found in the appropriate constant inLocalDataType.

A data point can represent a instantaneous reading as well as aggregates over a time interval. Check the data type documentation to determine which is the case for a particular data type.

LocalDataPoints always contain one value for each data typeLocalField.

Public Method Summary

boolean
LocalDataType
getDataType()
Returns the data type defining the format of the values in this data point.
long
getEndTime(TimeUnit timeUnit)
Returns the end time of the interval represented by this data point, in the given unit since epoch.
long
getStartTime(TimeUnit timeUnit)
Returns the start time of the interval represented by this data point, in the given unit since epoch.
LocalValue
getValue(LocalField field)
Returns the value holder for the field with the given name.
int
String

Inherited Method Summary

Public Methods

public booleanequals(Objectother)

publicLocalDataType getDataType()

Returns the data type defining the format of the values in this data point.

public longgetEndTime(TimeUnit timeUnit)

Returns the end time of the interval represented by this data point, in the given unit since epoch.

public longgetStartTime(TimeUnit timeUnit)

Returns the start time of the interval represented by this data point, in the given unit since epoch.

publicLocalValue getValue(LocalField field)

Returns the value holder for the field with the given name. This method can be used both to query the value and to set it.

Parameters
field One of the fields of this data type.
Returns
  • The value associated with the given field.
Throws
IllegalArgumentException If the given field doesn't match any of the fields for this data point's data type.

public inthashCode()

publicStringtoString()