org.msgpack.value.impl
Class StringValueImpl

java.lang.Object
  extended by org.msgpack.value.impl.AbstractValueRef
      extended by org.msgpack.value.impl.AbstractValue
          extended by org.msgpack.value.impl.StringValueImpl
All Implemented Interfaces:
RawValue, StringValue, Value, ValueRef

public class StringValueImpl
extends AbstractValue
implements StringValue

Created on 5/30/14.


Field Summary
 
Fields inherited from class org.msgpack.value.impl.AbstractValueRef
NUMBER_TYPE_MASK, RAW_TYPE_MASK
 
Constructor Summary
StringValueImpl(java.lang.String value)
           
 
Method Summary
 void accept(ValueVisitor visitor)
           
 boolean equals(java.lang.Object o)
           
 ValueType getValueType()
           
 int hashCode()
           
 byte[] toByteArray()
           
 java.nio.ByteBuffer toByteBuffer()
           
 MessageBuffer toMessageBuffer()
           
 java.lang.String toString()
           
 StringValue toValue()
          Create an immutable value from this reference
 void writeTo(MessagePacker pk)
           
 
Methods inherited from class org.msgpack.value.impl.AbstractValue
isRef
 
Methods inherited from class org.msgpack.value.impl.AbstractValueRef
as, as, asArrayValue, asBinary, asBoolean, asExtended, asFloat, asInteger, asMapValue, asNil, asNumber, asRaw, asString, getArrayCursor, getMapCursor, isArray, isBinary, isBoolean, isExtended, isFloat, isInteger, isMap, isNil, isNumber, isRaw, isString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.msgpack.value.Value
asArrayValue, asMapValue
 
Methods inherited from interface org.msgpack.value.ValueRef
asBinary, asBoolean, asExtended, asFloat, asInteger, asNil, asNumber, asRaw, asString, getArrayCursor, getMapCursor, isArray, isBinary, isBoolean, isExtended, isFloat, isInteger, isMap, isNil, isNumber, isRaw, isRef, isString
 

Constructor Detail

StringValueImpl

public StringValueImpl(java.lang.String value)
Method Detail

getValueType

public ValueType getValueType()
Specified by:
getValueType in interface ValueRef

toByteArray

public byte[] toByteArray()
Specified by:
toByteArray in interface RawValue

toMessageBuffer

public MessageBuffer toMessageBuffer()
Specified by:
toMessageBuffer in interface RawValue

toString

public java.lang.String toString()
Specified by:
toString in interface RawValue
Overrides:
toString in class java.lang.Object

toByteBuffer

public java.nio.ByteBuffer toByteBuffer()
Specified by:
toByteBuffer in interface RawValue

writeTo

public void writeTo(MessagePacker pk)
             throws java.io.IOException
Specified by:
writeTo in interface ValueRef
Throws:
java.io.IOException

accept

public void accept(ValueVisitor visitor)
Specified by:
accept in interface ValueRef

toValue

public StringValue toValue()
Description copied from interface: ValueRef
Create an immutable value from this reference

Specified by:
toValue in interface RawValue
Specified by:
toValue in interface StringValue
Specified by:
toValue in interface ValueRef
Returns:

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object