public class ImmutableNilValueImpl extends AbstractImmutableValue implements ImmutableNilValue
ImmutableNilValueImpl Implements ImmutableNilValue.
This class is a singleton. ImmutableNilValueImpl.get() is the only instances of this class.NilValue| Modifier and Type | Field and Description |
|---|---|
private static ImmutableNilValue |
instance |
| Modifier | Constructor and Description |
|---|---|
private |
ImmutableNilValueImpl() |
| Modifier and Type | Method and Description |
|---|---|
ImmutableNilValue |
asNilValue()
Returns the value as
NilValue. |
boolean |
equals(java.lang.Object o)
Compares this value to the specified object.
|
static ImmutableNilValue |
get() |
ValueType |
getValueType()
Returns type of this value.
|
int |
hashCode() |
ImmutableNilValue |
immutableValue()
Returns immutable copy of this value.
|
java.lang.String |
toJson()
Returns json representation of this Value.
|
java.lang.String |
toString() |
void |
writeTo(MessagePacker pk)
Serializes the value using the specified
MessagePacker |
asArrayValue, asBinaryValue, asBooleanValue, asExtensionValue, asFloatValue, asIntegerValue, asMapValue, 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, asRawValue, asStringValue, asTimestampValueasExtensionValue, asNumberValue, isArrayValue, isBinaryValue, isBooleanValue, isExtensionValue, isFloatValue, isIntegerValue, isMapValue, isNilValue, isNumberValue, isRawValue, isStringValue, isTimestampValueprivate static ImmutableNilValue instance
public static ImmutableNilValue get()
public ValueType getValueType()
Valueinstanceof to check type of a value because type of a mutable value is variable.getValueType in interface Valuepublic ImmutableNilValue immutableValue()
Valuethis without copying the value if this value is already immutable.immutableValue in interface Valuepublic ImmutableNilValue asNilValue()
ValueNilValue. Otherwise throws MessageTypeCastException.
Note that you can't use instanceof or cast ((NilValue) thisValue) to check type of a value because type of a mutable value is variable.asNilValue in interface ImmutableValueasNilValue in interface ValueasNilValue in class AbstractImmutableValuepublic void writeTo(MessagePacker pk) 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 toString()
toString 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 character