Top Description Methods
tech.units.indriya.spi

public Interface Measurement<Q extends Quantity<Q>>

extends QuantitySupplier<Q extends Quantity<Q>>, Serializable
Known Direct Implementers
tech.units.indriya.spi.AbstractMeasurement
Type Parameters
<Q>
the quantity type
Static Imports
tech.units.indriya.spi.AbstractMeasurement.Default

A Measurement contains a Quantity and a timestamp.

A Measurement object is used for maintaining the tuple of quantity and time-stamp. The value is represented as Quantity and the time as Instant plus long for backward-compatibility.

Author
werner
Since
1.0
Version
1.0
See Also
QuantitySupplier

Method Summary

Modifier and TypeMethod and Description
public Instant

Returns:

an instant.
getInstant
()

Returns the Instant as timestamp.

public long

Returns:

a timestamp.
getTimestamp
()

Returns the timestamp of this Measurement.

public static <Q extends Quantity<Q>> Measurement<Q>
of(Quantity<Q> q)

public static <Q extends Quantity<Q>> Measurement<Q>
of(Quantity<Q> q, Instant i)

public static <Q extends Quantity<Q>> Measurement<Q>
public static <Q extends Quantity<Q>> Measurement<Q>
public static <Q extends Quantity<Q>> Measurement<Q>
of(Quantity<Q> q, long l)

Inherited from tech.uom.lib.common.function.QuantitySupplier:
getQuantity

Method Detail

getInstantback to summary
public Instant getInstant()

Returns the Instant as timestamp.

Returns:Instant

an instant.

getTimestampback to summary
public long getTimestamp()

Returns the timestamp of this Measurement.

Returns:long

a timestamp.

ofback to summary
public static <Q extends Quantity<Q>> Measurement<Q> of(Quantity<Q> q)
Annotations
@SuppressWarnings
ofback to summary
public static <Q extends Quantity<Q>> Measurement<Q> of(Quantity<Q> q, Instant i)
ofback to summary
public static <Q extends Quantity<Q>> Measurement<Q> of(ComparableQuantity<Q> q)
ofback to summary
public static <Q extends Quantity<Q>> Measurement<Q> of(ComparableQuantity<Q> q, Instant i)
ofback to summary
public static <Q extends Quantity<Q>> Measurement<Q> of(Quantity<Q> q, long l)