T - The data value.Supplier<T>, tech.uom.lib.common.function.NameableTimedQuantityDatapublic class TimedData<T> extends Object implements tech.uom.lib.common.function.Nameable, Supplier<T>
| Modifier | Constructor | Description |
|---|---|---|
protected |
TimedData(T value,
long time) |
Construct an instance of TimedData with a value and timestamp.
|
protected |
TimedData(T value,
long time,
String name) |
Construct an instance of TimedData with a value, a timestamp and a name.
|
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
equals(Object obj) |
|
T |
get() |
|
Instant |
getInstant() |
|
String |
getName() |
|
long |
getTimestamp() |
Returns the time with which this TimedData was created.
|
int |
hashCode() |
|
static <T> TimedData<T> |
of(T val,
long time) |
Returns a
TimedData with the specified values. |
static <T> TimedData<T> |
of(T val,
long time,
String name) |
Returns a
TimedData with the specified values. |
String |
toString() |
protected TimedData(T value, long time)
data - The value of the TimedData.time - The timestamp of the TimedData.public static <T> TimedData<T> of(T val, long time)
TimedData with the specified values.T - the class of the valueval - The value for the timed data.time - The timestamp.TimedData with the given valuespublic static <T> TimedData<T> of(T val, long time, String name)
TimedData with the specified values.T - the class of the valueval - The value for the timed data.time - The timestamp.name - The name.TimedData with the given valuespublic long getTimestamp()
public String getName()
getName in interface tech.uom.lib.common.function.Nameablepublic Instant getInstant()
Copyright © 2005–2023 Units of Measurement project. All rights reserved.