Package tech.units.indriya.spi
Interface Measurement<Q extends Quantity<Q>>
-
- Type Parameters:
Q- the quantity type
- All Superinterfaces:
tech.uom.lib.common.function.QuantitySupplier<Q>,Serializable
public interface Measurement<Q extends Quantity<Q>> extends tech.uom.lib.common.function.QuantitySupplier<Q>, Serializable
A Measurement contains aQuantityand a timestamp.A
Measurementobject is used for maintaining the tuple of quantity and time-stamp. The value is represented as Quantity and the time as Instant pluslongfor backward-compatibility.- Since:
- 1.0
- Version:
- 1.0
- Author:
- werner
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description InstantgetInstant()Returns the Instant as timestamp.longgetTimestamp()Returns the timestamp of thisMeasurement.static <Q extends Quantity<Q>>
Measurement<Q>of(Quantity<Q> q)static <Q extends Quantity<Q>>
Measurement<Q>of(Quantity<Q> q, long l)static <Q extends Quantity<Q>>
Measurement<Q>of(Quantity<Q> q, Instant i)static <Q extends Quantity<Q>>
Measurement<Q>of(ComparableQuantity<Q> q)static <Q extends Quantity<Q>>
Measurement<Q>of(ComparableQuantity<Q> q, Instant i)
-
-
-
Method Detail
-
getTimestamp
long getTimestamp()
Returns the timestamp of thisMeasurement.- Returns:
- a timestamp.
-
getInstant
Instant getInstant()
Returns the Instant as timestamp.- Returns:
- an instant.
-
of
static <Q extends Quantity<Q>> Measurement<Q> of(Quantity<Q> q)
-
of
static <Q extends Quantity<Q>> Measurement<Q> of(Quantity<Q> q, Instant i)
-
of
static <Q extends Quantity<Q>> Measurement<Q> of(ComparableQuantity<Q> q)
-
of
static <Q extends Quantity<Q>> Measurement<Q> of(ComparableQuantity<Q> q, Instant i)
-
of
static <Q extends Quantity<Q>> Measurement<Q> of(Quantity<Q> q, long l)
-
-