Class TimedData<T>
java.lang.Object
tech.units.indriya.quantity.time.TimedData<T>
- Type Parameters:
T- The data value.
- All Implemented Interfaces:
Supplier<T>, tech.uom.lib.common.function.Nameable
public class TimedData<T>
extends Object
implements tech.uom.lib.common.function.Nameable, Supplier<T>
TimedData is a container for a data value that keeps track of its age. This class keeps track of the birth time of a bit of data, i.e. time the
object is instantiated.
The TimedData MUST be immutable.
The TimedData MUST be immutable.
- Version:
- 0.5
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
value
-
timestamp
private final long timestamp -
instant
-
name
-
-
Constructor Details
-
TimedData
Construct an instance of TimedData with a value and timestamp.- Parameters:
time- The timestamp of the TimedData.data- The value of the TimedData.
-
-
Method Details
-
of
Returns anMeasurementRangewith the specified values.- Type Parameters:
T- the class of the value- Parameters:
val- The minimum value for the measurement range.time- The maximum value for the measurement range.- Returns:
- an
MeasurementRangewith the given values
-
getTimestamp
public long getTimestamp()Returns the time with which this TimedData was created.- Returns:
- the time of creation
-
getName
- Specified by:
getNamein interfacetech.uom.lib.common.function.Nameable
-
get
-
equals
-
hashCode
-
toString
-
getInstant
-