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 ofValueinterface.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ImmutableArrayValueasArrayValue()Returns the value asArrayValue.ImmutableBinaryValueasBinaryValue()Returns the value asBinaryValue.ImmutableBooleanValueasBooleanValue()Returns the value asBooleanValue.ImmutableFloatValueasFloatValue()Returns the value asFloatValue.ImmutableIntegerValueasIntegerValue()Returns the value asIntegerValue.ImmutableMapValueasMapValue()Returns the value asMapValue.ImmutableNilValueasNilValue()Returns the value asNilValue.ImmutableRawValueasRawValue()Returns the value asRawValue.ImmutableStringValueasStringValue()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:ValueReturns the value asNilValue. Otherwise throwsMessageTypeCastException. Note that you can't useinstanceofor cast((NilValue) thisValue)to check type of a value because type of a mutable value is variable.- Specified by:
asNilValuein interfaceValue
-
asBooleanValue
ImmutableBooleanValue asBooleanValue()
Description copied from interface:ValueReturns the value asBooleanValue. Otherwise throwsMessageTypeCastException. Note that you can't useinstanceofor cast((BooleanValue) thisValue)to check type of a value because type of a mutable value is variable.- Specified by:
asBooleanValuein interfaceValue
-
asIntegerValue
ImmutableIntegerValue asIntegerValue()
Description copied from interface:ValueReturns the value asIntegerValue. Otherwise throwsMessageTypeCastException. Note that you can't useinstanceofor cast((IntegerValue) thisValue)to check type of a value because type of a mutable value is variable.- Specified by:
asIntegerValuein interfaceValue
-
asFloatValue
ImmutableFloatValue asFloatValue()
Description copied from interface:ValueReturns the value asFloatValue. Otherwise throwsMessageTypeCastException. Note that you can't useinstanceofor cast((FloatValue) thisValue)to check type of a value because type of a mutable value is variable.- Specified by:
asFloatValuein interfaceValue
-
asArrayValue
ImmutableArrayValue asArrayValue()
Description copied from interface:ValueReturns the value asArrayValue. Otherwise throwsMessageTypeCastException. Note that you can't useinstanceofor cast((ArrayValue) thisValue)to check type of a value because type of a mutable value is variable.- Specified by:
asArrayValuein interfaceValue
-
asMapValue
ImmutableMapValue asMapValue()
Description copied from interface:ValueReturns the value asMapValue. Otherwise throwsMessageTypeCastException. Note that you can't useinstanceofor cast((MapValue) thisValue)to check type of a value because type of a mutable value is variable.- Specified by:
asMapValuein interfaceValue
-
asRawValue
ImmutableRawValue asRawValue()
Description copied from interface:ValueReturns the value asRawValue. Otherwise throwsMessageTypeCastException. Note that you can't useinstanceofor cast((RawValue) thisValue)to check type of a value because type of a mutable value is variable.- Specified by:
asRawValuein interfaceValue
-
asBinaryValue
ImmutableBinaryValue asBinaryValue()
Description copied from interface:ValueReturns the value asBinaryValue. Otherwise throwsMessageTypeCastException. Note that you can't useinstanceofor cast((BinaryValue) thisValue)to check type of a value because type of a mutable value is variable.- Specified by:
asBinaryValuein interfaceValue
-
asStringValue
ImmutableStringValue asStringValue()
Description copied from interface:ValueReturns the value asStringValue. Otherwise throwsMessageTypeCastException. Note that you can't useinstanceofor cast((StringValue) thisValue)to check type of a value because type of a mutable value is variable.- Specified by:
asStringValuein interfaceValue
-
-