Class TimestampedValue<V>
- java.lang.Object
-
- io.streamthoughts.azkarra.api.model.TimestampedValue<V>
-
- All Implemented Interfaces:
Comparable<TimestampedValue>
public class TimestampedValue<V> extends Object implements Comparable<TimestampedValue>
-
-
Constructor Summary
Constructors Constructor Description TimestampedValue(long timestamp, V value)
Creates a newTimestampedValue
instance.TimestampedValue(V value)
Creates a newTimestampedValue
instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(TimestampedValue that)
boolean
equals(Object o)
int
hashCode()
long
timestamp()
Returns the timestamp in milliseconds for this value.String
toString()
V
value()
Returns this valueTimestampedValue
.
-
-
-
Constructor Detail
-
TimestampedValue
public TimestampedValue(V value)
Creates a newTimestampedValue
instance.- Parameters:
value
- the value.
-
TimestampedValue
public TimestampedValue(long timestamp, V value)
Creates a newTimestampedValue
instance.- Parameters:
timestamp
- the timestamp.value
- the value.
-
-
Method Detail
-
timestamp
public long timestamp()
Returns the timestamp in milliseconds for this value.
-
value
public V value()
Returns this valueTimestampedValue
.
-
compareTo
public int compareTo(TimestampedValue that)
- Specified by:
compareTo
in interfaceComparable<V>
-
-