Interface Measurement<Q extends javax.measure.Quantity<Q>>

  • Type Parameters:
    Q -
    All Superinterfaces:
    tech.uom.lib.common.function.QuantitySupplier<Q>, Serializable

    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 long for backward-compatibility.

    Since:
    1.0
    Version:
    0.8
    Author:
    werner
    • Method Summary

      Modifier and Type Method Description
      Instant getInstant()
      Returns the Instant as timestamp.
      long getTimestamp()
      Returns the timestamp of this Measurement.
      static <Q extends javax.measure.Quantity<Q>>
      Measurement<Q>
      of​(javax.measure.Quantity<Q> q)  
      static <Q extends javax.measure.Quantity<Q>>
      Measurement<Q>
      of​(javax.measure.Quantity<Q> q, long l)  
      static <Q extends javax.measure.Quantity<Q>>
      Measurement<Q>
      of​(javax.measure.Quantity<Q> q, Instant i)  
      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