-
- All Implemented Interfaces:
-
com.batch.android.msgpack.value.BinaryValue,com.batch.android.msgpack.value.ImmutableBinaryValue,com.batch.android.msgpack.value.ImmutableRawValue,com.batch.android.msgpack.value.ImmutableValue,com.batch.android.msgpack.value.RawValue,com.batch.android.msgpack.value.Value
public class ImmutableBinaryValueImpl extends AbstractImmutableRawValue implements ImmutableBinaryValue
{@code ImmutableBinaryValueImpl}Implements{@code ImmutableBinaryValue}using a{@code byte[]}field. This implementation caches result of{@code toString()}and{@code asString()}using a private{@code String}field.
-
-
Constructor Summary
Constructors Constructor Description ImmutableBinaryValueImpl(Array<byte> data)
-
Method Summary
Modifier and Type Method Description ValueTypegetValueType()Returns type of this value. ImmutableBinaryValueimmutableValue()Returns immutable copy of this value. ImmutableBinaryValueasBinaryValue()Returns the value as {@code BinaryValue}.voidwriteTo(MessagePacker pk)Serializes the value using the specified {@code MessagePacker}booleanequals(Object o)inthashCode()-
Methods inherited from class com.batch.android.msgpack.value.impl.AbstractImmutableRawValue
asByteArray, asByteBuffer, asRawValue, asString, toJson, toString -
Methods inherited from class com.batch.android.msgpack.value.impl.AbstractImmutableValue
asArrayValue, asBooleanValue, asExtensionValue, asFloatValue, asIntegerValue, asMapValue, asNilValue, asNumberValue, asStringValue, isArrayValue, isBinaryValue, isBooleanValue, isExtensionValue, isFloatValue, isIntegerValue, isMapValue, isNilValue, isNumberValue, isRawValue, isStringValue -
Methods inherited from class com.batch.android.msgpack.value.Value
asArrayValue, asBinaryValue, asBooleanValue, asExtensionValue, asFloatValue, asIntegerValue, asMapValue, asNilValue, asNumberValue, asRawValue, asStringValue, equals, immutableValue -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
ImmutableBinaryValueImpl
ImmutableBinaryValueImpl(Array<byte> data)
-
-
Method Detail
-
getValueType
ValueType getValueType()
Returns type of this value.
Note that you can't use
instanceofto check type of a value because type of a mutable value is variable.
-
immutableValue
ImmutableBinaryValue immutableValue()
Returns immutable copy of this value.
This method simply returns
thiswithout copying the value if this value is already immutable.
-
asBinaryValue
ImmutableBinaryValue asBinaryValue()
Returns the value as
{@code BinaryValue}. Otherwise throws{@code MessageTypeCastException}.Note that you can't use
instanceofor cast((BinaryValue) thisValue)to check type of a value because type of a mutable value is variable.
-
writeTo
void writeTo(MessagePacker pk)
Serializes the value using the specified
{@code MessagePacker}
-
hashCode
int hashCode()
-
-
-
-