Package org.msgpack.value
Interface ImmutableValue
-
- All Superinterfaces:
Value
- All Known Subinterfaces:
ImmutableArrayValue
,ImmutableBinaryValue
,ImmutableBooleanValue
,ImmutableExtensionValue
,ImmutableFloatValue
,ImmutableIntegerValue
,ImmutableMapValue
,ImmutableNilValue
,ImmutableNumberValue
,ImmutableRawValue
,ImmutableStringValue
- All Known Implementing Classes:
AbstractImmutableRawValue
,ImmutableArrayValueImpl
,ImmutableBigIntegerValueImpl
,ImmutableBinaryValueImpl
,ImmutableBooleanValueImpl
,ImmutableDoubleValueImpl
,ImmutableExtensionValueImpl
,ImmutableLongValueImpl
,ImmutableMapValueImpl
,ImmutableNilValueImpl
,ImmutableStringValueImpl
public interface ImmutableValue extends Value
Immutable declaration ofValue
interface.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ImmutableArrayValue
asArrayValue()
Returns the value asArrayValue
.ImmutableBinaryValue
asBinaryValue()
Returns the value asBinaryValue
.ImmutableBooleanValue
asBooleanValue()
Returns the value asBooleanValue
.ImmutableFloatValue
asFloatValue()
Returns the value asFloatValue
.ImmutableIntegerValue
asIntegerValue()
Returns the value asIntegerValue
.ImmutableMapValue
asMapValue()
Returns the value asMapValue
.ImmutableNilValue
asNilValue()
Returns the value asNilValue
.ImmutableRawValue
asRawValue()
Returns the value asRawValue
.ImmutableStringValue
asStringValue()
Returns the value asStringValue
.-
Methods inherited from interface org.msgpack.value.Value
asExtensionValue, asNumberValue, equals, getValueType, immutableValue, isArrayValue, isBinaryValue, isBooleanValue, isExtensionValue, isFloatValue, isIntegerValue, isMapValue, isNilValue, isNumberValue, isRawValue, isStringValue, toJson, writeTo
-
-
-
-
Method Detail
-
asNilValue
ImmutableNilValue asNilValue()
Description copied from interface:Value
Returns the value asNilValue
. Otherwise throwsMessageTypeCastException
. Note that you can't useinstanceof
or cast((NilValue) thisValue)
to check type of a value because type of a mutable value is variable.- Specified by:
asNilValue
in interfaceValue
-
asBooleanValue
ImmutableBooleanValue asBooleanValue()
Description copied from interface:Value
Returns the value asBooleanValue
. Otherwise throwsMessageTypeCastException
. Note that you can't useinstanceof
or cast((BooleanValue) thisValue)
to check type of a value because type of a mutable value is variable.- Specified by:
asBooleanValue
in interfaceValue
-
asIntegerValue
ImmutableIntegerValue asIntegerValue()
Description copied from interface:Value
Returns the value asIntegerValue
. Otherwise throwsMessageTypeCastException
. Note that you can't useinstanceof
or cast((IntegerValue) thisValue)
to check type of a value because type of a mutable value is variable.- Specified by:
asIntegerValue
in interfaceValue
-
asFloatValue
ImmutableFloatValue asFloatValue()
Description copied from interface:Value
Returns the value asFloatValue
. Otherwise throwsMessageTypeCastException
. Note that you can't useinstanceof
or cast((FloatValue) thisValue)
to check type of a value because type of a mutable value is variable.- Specified by:
asFloatValue
in interfaceValue
-
asArrayValue
ImmutableArrayValue asArrayValue()
Description copied from interface:Value
Returns the value asArrayValue
. Otherwise throwsMessageTypeCastException
. Note that you can't useinstanceof
or cast((ArrayValue) thisValue)
to check type of a value because type of a mutable value is variable.- Specified by:
asArrayValue
in interfaceValue
-
asMapValue
ImmutableMapValue asMapValue()
Description copied from interface:Value
Returns the value asMapValue
. Otherwise throwsMessageTypeCastException
. Note that you can't useinstanceof
or cast((MapValue) thisValue)
to check type of a value because type of a mutable value is variable.- Specified by:
asMapValue
in interfaceValue
-
asRawValue
ImmutableRawValue asRawValue()
Description copied from interface:Value
Returns the value asRawValue
. Otherwise throwsMessageTypeCastException
. Note that you can't useinstanceof
or cast((RawValue) thisValue)
to check type of a value because type of a mutable value is variable.- Specified by:
asRawValue
in interfaceValue
-
asBinaryValue
ImmutableBinaryValue asBinaryValue()
Description copied from interface:Value
Returns the value asBinaryValue
. Otherwise throwsMessageTypeCastException
. Note that you can't useinstanceof
or cast((BinaryValue) thisValue)
to check type of a value because type of a mutable value is variable.- Specified by:
asBinaryValue
in interfaceValue
-
asStringValue
ImmutableStringValue asStringValue()
Description copied from interface:Value
Returns the value asStringValue
. Otherwise throwsMessageTypeCastException
. Note that you can't useinstanceof
or cast((StringValue) thisValue)
to check type of a value because type of a mutable value is variable.- Specified by:
asStringValue
in interfaceValue
-
-