Package 

Interface ImmutableValue

  • All Implemented Interfaces:
    com.batch.android.msgpack.value.Value

    
    public interface ImmutableValue
     implements Value
                        

    Immutable declaration of Value interface.

    • Method Detail

      • asNilValue

         abstract ImmutableNilValue asNilValue()

        Returns the value as {@code NilValue}. Otherwise throws {@code 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.

      • asBooleanValue

         abstract ImmutableBooleanValue asBooleanValue()

        Returns the value as {@code BooleanValue}. Otherwise throws {@code MessageTypeCastException}.

        Note that you can't use instanceof or cast ((BooleanValue) thisValue) to check type of a value because type of a mutable value is variable.

      • asIntegerValue

         abstract ImmutableIntegerValue asIntegerValue()

        Returns the value as {@code IntegerValue}. Otherwise throws {@code MessageTypeCastException}.

        Note that you can't use instanceof or cast ((IntegerValue) thisValue) to check type of a value because type of a mutable value is variable.

      • asFloatValue

         abstract ImmutableFloatValue asFloatValue()

        Returns the value as {@code FloatValue}. Otherwise throws {@code MessageTypeCastException}.

        Note that you can't use instanceof or cast ((FloatValue) thisValue) to check type of a value because type of a mutable value is variable.

      • asArrayValue

         abstract ImmutableArrayValue asArrayValue()

        Returns the value as {@code ArrayValue}. Otherwise throws {@code MessageTypeCastException}.

        Note that you can't use instanceof or cast ((ArrayValue) thisValue) to check type of a value because type of a mutable value is variable.

      • asMapValue

         abstract ImmutableMapValue asMapValue()

        Returns the value as {@code MapValue}. Otherwise throws {@code MessageTypeCastException}.

        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.

      • asRawValue

         abstract ImmutableRawValue asRawValue()

        Returns the value as {@code RawValue}. Otherwise throws {@code MessageTypeCastException}.

        Note that you can't use instanceof or cast ((RawValue) thisValue) to check type of a value because type of a mutable value is variable.

      • asBinaryValue

         abstract ImmutableBinaryValue asBinaryValue()

        Returns the value as {@code BinaryValue}. Otherwise throws {@code MessageTypeCastException}.

        Note that you can't use instanceof or cast ((BinaryValue) thisValue) to check type of a value because type of a mutable value is variable.

      • asStringValue

         abstract ImmutableStringValue asStringValue()

        Returns the value as {@code StringValue}. Otherwise throws {@code MessageTypeCastException}.

        Note that you can't use instanceof or cast ((StringValue) thisValue) to check type of a value because type of a mutable value is variable.