LocalDataPoint

public final class LocalDataPoint extends Object

Represents a single data point in a LocalDataType'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 in LocalDataType.

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 type LocalField.

Public Method Summary

boolean
equals(Object other)
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 boolean equals (Object other)

public LocalDataType getDataType ()

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

public long getEndTime (TimeUnit timeUnit)

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

public long getStartTime (TimeUnit timeUnit)

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

public LocalValue 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 int hashCode ()

public String toString ()