ValueType - The value type.public class DefaultTemporalValue<ValueType> extends AbstractTemporal implements TemporalValue<ValueType>, Pair<java.util.Date,ValueType>
DefaultTemporalValue class is a default implementation of the
TemporalValue interface. It has fields for the time and the value.| Modifier and Type | Field and Description |
|---|---|
protected ValueType |
value
The value associated with the time.
|
time| Constructor and Description |
|---|
DefaultTemporalValue()
Creates a new, empty
DefaultTemporalValue. |
DefaultTemporalValue(java.util.Date time,
ValueType value)
Creates a new
DefaultTemporalValue. |
| Modifier and Type | Method and Description |
|---|---|
java.util.Date |
getFirst()
Gets the first value of the pair, which is the time.
|
ValueType |
getSecond()
Gets the second value fo the pair, which is the value.
|
ValueType |
getValue()
Gets the value stored in this object.
|
void |
setValue(ValueType value)
Sets the value.
|
clone, compareTo, getTime, setTimeprotected ValueType value
public DefaultTemporalValue()
DefaultTemporalValue.public DefaultTemporalValue(java.util.Date time,
ValueType value)
DefaultTemporalValue.time - The time associated with the value.value - The value associated with the time.public ValueType getValue()
TemporalValuegetValue in interface TemporalValue<ValueType>public void setValue(ValueType value)
value - The new value.public java.util.Date getFirst()