Package tech.units.indriya.spi
Interface Measurement<Q extends javax.measure.Quantity<Q>>
- Type Parameters:
Q-
- All Superinterfaces:
tech.uom.lib.common.function.QuantitySupplier<Q>,Serializable
- All Known Implementing Classes:
AbstractMeasurement,AbstractMeasurement.Default,AbstractMeasurement.DefaultComparable
public interface Measurement<Q extends javax.measure.Quantity<Q>>
extends tech.uom.lib.common.function.QuantitySupplier<Q>, Serializable
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
- Since:
- 1.0
- Version:
- 0.7
-
Method Summary
Modifier and TypeMethodDescriptionReturns the Instant as timestamp.longReturns the timestamp of thisMeasurement.static <Q extends javax.measure.Quantity<Q>>
Measurement<Q> of(javax.measure.Quantity<Q> q) static <Q extends javax.measure.Quantity<Q>>
Measurement<Q> static <Q extends javax.measure.Quantity<Q>>
Measurement<Q> of(ComparableQuantity<Q> q) static <Q extends javax.measure.Quantity<Q>>
Measurement<Q> of(ComparableQuantity<Q> q, Instant i) Methods inherited from interface tech.uom.lib.common.function.QuantitySupplier
getQuantity
-
Method Details
-
getTimestamp
long getTimestamp()Returns the timestamp of thisMeasurement.- Returns:
- a timestamp.
-
getInstant
Instant getInstant()Returns the Instant as timestamp.- Returns:
- an instant.
-
of
-
of
static <Q extends javax.measure.Quantity<Q>> Measurement<Q> of(javax.measure.Quantity<Q> q, Instant i) -
of
-
of
-