org.msgpack.value.impl
Class MapValueImpl

java.lang.Object
  extended by org.msgpack.value.impl.AbstractValueRef
      extended by org.msgpack.value.impl.AbstractValue
          extended by org.msgpack.value.impl.MapValueImpl
All Implemented Interfaces:
MapCursor, MapValue, Value, ValueRef

public class MapValueImpl
extends AbstractValue
implements MapValue

Created on 5/30/14.


Field Summary
 
Fields inherited from class org.msgpack.value.impl.AbstractValueRef
NUMBER_TYPE_MASK, RAW_TYPE_MASK
 
Constructor Summary
MapValueImpl(Value[] array)
           
 
Method Summary
 void accept(ValueVisitor visitor)
           
static MapValue empty()
           
 boolean equals(java.lang.Object o)
           
 ValueType getValueType()
           
 int hashCode()
           
 boolean hasNext()
          Test whether this cursor can point to a next key or value.
 ValueRef nextKeyOrValue()
          Retrieves a reference to the next key or value.
 int size()
           
 void skipAll()
          Skips all of the remaining keys and values.
 void skipKeyOrValue()
          Skips a next key or value
 Value[] toKeyValueSeq()
           
 java.util.Map<Value,Value> toMap()
           
 java.lang.String toString()
           
 MapValue 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

MapValueImpl

public MapValueImpl(Value[] array)
Method Detail

empty

public static MapValue empty()

getValueType

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

toKeyValueSeq

public Value[] toKeyValueSeq()
Specified by:
toKeyValueSeq in interface MapValue

size

public int size()
Specified by:
size in interface MapCursor

hasNext

public boolean hasNext()
Description copied from interface: MapCursor
Test whether this cursor can point to a next key or value.

Specified by:
hasNext in interface MapCursor
Returns:

nextKeyOrValue

public ValueRef nextKeyOrValue()
Description copied from interface: MapCursor
Retrieves a reference to the next key or value.

Specified by:
nextKeyOrValue in interface MapCursor
Returns:

skipKeyOrValue

public void skipKeyOrValue()
Description copied from interface: MapCursor
Skips a next key or value

Specified by:
skipKeyOrValue in interface MapCursor

skipAll

public void skipAll()
Description copied from interface: MapCursor
Skips all of the remaining keys and values.

Specified by:
skipAll in interface MapCursor

toMap

public java.util.Map<Value,Value> toMap()
Specified by:
toMap in interface MapValue

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 MapValue toValue()
Description copied from interface: ValueRef
Create an immutable value from this reference

Specified by:
toValue in interface MapCursor
Specified by:
toValue in interface MapValue
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

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object