public class ImmutableExtensionValueImpl extends AbstractImmutableValue implements ImmutableExtensionValue
ImmutableExtensionValueImpl Implements ImmutableExtensionValue using a byte and a byte[] fields.ExtensionValue| Constructor and Description |
|---|
ImmutableExtensionValueImpl(byte type,
byte[] data) |
| Modifier and Type | Method and Description |
|---|---|
ImmutableExtensionValue |
asExtensionValue()
Returns the value as
ExtensionValue. |
boolean |
equals(java.lang.Object o)
Compares this value to the specified object.
|
byte[] |
getData() |
byte |
getType() |
ValueType |
getValueType()
Returns type of this value.
|
int |
hashCode() |
ImmutableExtensionValue |
immutableValue()
Returns immutable copy of this value.
|
java.lang.String |
toJson()
Returns json representation of this Value.
|
java.lang.String |
toString() |
void |
writeTo(MessagePacker packer)
Serializes the value using the specified
MessagePacker |
asArrayValue, asBinaryValue, asBooleanValue, asFloatValue, asIntegerValue, asMapValue, asNilValue, asNumberValue, asRawValue, asStringValue, asTimestampValue, isArrayValue, isBinaryValue, isBooleanValue, isExtensionValue, isFloatValue, isIntegerValue, isMapValue, isNilValue, isNumberValue, isRawValue, isStringValue, isTimestampValueclone, finalize, getClass, notify, notifyAll, wait, wait, waitasArrayValue, asBinaryValue, asBooleanValue, asFloatValue, asIntegerValue, asMapValue, asNilValue, asRawValue, asStringValue, asTimestampValueasNumberValue, isArrayValue, isBinaryValue, isBooleanValue, isExtensionValue, isFloatValue, isIntegerValue, isMapValue, isNilValue, isNumberValue, isRawValue, isStringValue, isTimestampValuepublic ImmutableExtensionValueImpl(byte type,
byte[] data)
public ValueType getValueType()
Valueinstanceof to check type of a value because type of a mutable value is variable.getValueType in interface Valuepublic ImmutableExtensionValue immutableValue()
Valuethis without copying the value if this value is already immutable.immutableValue in interface Valuepublic ImmutableExtensionValue asExtensionValue()
ValueExtensionValue. Otherwise throws MessageTypeCastException.
Note that you can't use instanceof or cast ((ExtensionValue) thisValue) to check type of a value
because type of a mutable value is variable.asExtensionValue in interface ValueasExtensionValue in class AbstractImmutableValuepublic byte getType()
getType in interface ExtensionValuepublic byte[] getData()
getData in interface ExtensionValuepublic void writeTo(MessagePacker packer) throws java.io.IOException
ValueMessagePackerwriteTo in interface Valuejava.io.IOExceptionMessagePackerpublic boolean equals(java.lang.Object o)
Valuetrue if type and value are equivalent.
If this value is MapValue or ArrayValue, this method check equivalence of elements recursively.public int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toJson()
ValueFollowing behavior is not configurable at this release and they might be changed at future releases:
U+FFFD replacement character.U+FFFD replacement characterpublic java.lang.String toString()
toString in class java.lang.Object