private class Variable.TimestampValueAccessor extends Variable.AbstractValueAccessor implements TimestampValue
| Modifier | Constructor and Description |
|---|---|
private |
TimestampValueAccessor() |
| Modifier and Type | Method and Description |
|---|---|
TimestampValue |
asTimestampValue()
Returns the value as
TimestampValue. |
byte[] |
getData() |
long |
getEpochSecond() |
int |
getNano() |
byte |
getType() |
ValueType |
getValueType()
Returns type of this value.
|
ImmutableTimestampValue |
immutableValue()
Returns immutable copy of this value.
|
boolean |
isTimestampValue()
Returns true if the type of this value is Timestamp.
|
long |
toEpochMillis() |
java.time.Instant |
toInstant() |
void |
writeTo(MessagePacker pk)
Serializes the value using the specified
MessagePacker |
asArrayValue, asBinaryValue, asBooleanValue, asExtensionValue, asFloatValue, asIntegerValue, asMapValue, asNilValue, asNumberValue, asRawValue, asStringValue, equals, hashCode, isArrayValue, isBinaryValue, isBooleanValue, isExtensionValue, isFloatValue, isIntegerValue, isMapValue, isNilValue, isNumberValue, isRawValue, isStringValue, toJson, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitasArrayValue, asBinaryValue, asBooleanValue, asExtensionValue, asFloatValue, asIntegerValue, asMapValue, asNilValue, asNumberValue, asRawValue, asStringValue, equals, isArrayValue, isBinaryValue, isBooleanValue, isExtensionValue, isFloatValue, isIntegerValue, isMapValue, isNilValue, isNumberValue, isRawValue, isStringValue, toJsonpublic boolean isTimestampValue()
ValueasTimestamp never throws exceptions.
Note that you can't use instanceof or cast ((MapValue) thisValue) to check type of a value because type of a mutable value is variable.isTimestampValue in interface ValueisTimestampValue in class Variable.AbstractValueAccessorpublic ValueType getValueType()
Valueinstanceof to check type of a value because type of a mutable value is variable.getValueType in interface Valuepublic TimestampValue asTimestampValue()
ValueTimestampValue. Otherwise throws MessageTypeCastException.
Note that you can't use instanceof or cast ((TimestampValue) thisValue) to check type of a value because type of a mutable value is variable.asTimestampValue in interface ValueasTimestampValue in class Variable.AbstractValueAccessorpublic ImmutableTimestampValue immutableValue()
Valuethis without copying the value if this value is already immutable.immutableValue in interface Valuepublic byte getType()
getType in interface ExtensionValuepublic byte[] getData()
getData in interface ExtensionValuepublic void writeTo(MessagePacker pk) throws java.io.IOException
ValueMessagePackerwriteTo in interface Valuejava.io.IOExceptionMessagePackerpublic long getEpochSecond()
getEpochSecond in interface TimestampValuepublic int getNano()
getNano in interface TimestampValuepublic long toEpochMillis()
toEpochMillis in interface TimestampValuepublic java.time.Instant toInstant()
toInstant in interface TimestampValue