Package org.msgpack.value
Interface MapValue
-
- All Superinterfaces:
Value
- All Known Subinterfaces:
ImmutableMapValue
- All Known Implementing Classes:
ImmutableMapValueImpl
public interface MapValue extends Value
Representation of MessagePack's Map type. MessagePack's Map type can represent sequence of key-value pairs.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.Set<java.util.Map.Entry<Value,Value>>
entrySet()
Value[]
getKeyValueArray()
Returns the key-value pairs as an array ofValue
.java.util.Set<Value>
keySet()
java.util.Map<Value,Value>
map()
Returns the value asMap
.int
size()
Returns number of key-value pairs in this array.java.util.Collection<Value>
values()
-
Methods inherited from interface org.msgpack.value.Value
asArrayValue, asBinaryValue, asBooleanValue, asExtensionValue, asFloatValue, asIntegerValue, asMapValue, asNilValue, asNumberValue, asRawValue, asStringValue, equals, getValueType, immutableValue, isArrayValue, isBinaryValue, isBooleanValue, isExtensionValue, isFloatValue, isIntegerValue, isMapValue, isNilValue, isNumberValue, isRawValue, isStringValue, toJson, writeTo
-
-
-
-
Method Detail
-
size
int size()
Returns number of key-value pairs in this array.
-
keySet
java.util.Set<Value> keySet()
-
values
java.util.Collection<Value> values()
-
getKeyValueArray
Value[] getKeyValueArray()
Returns the key-value pairs as an array ofValue
. Odd elements are keys. Next element of an odd element is a value corresponding to the key. For example, if this value represents{"k1": "v1", "k2": "v2"}
, this method returns ["k1", "v1", "k2", "v2"].
-
-