public class MapFieldValue<K extends FieldValue,V extends FieldValue> extends CompositeFieldValue implements Map<K,V>
Modifier and Type | Class and Description |
---|---|
(package private) class |
MapFieldValue.MapWrapper
Map of field values backed by a normal map of Java objects
|
FieldValue.RecursiveIteratorHandler
Modifier and Type | Field and Description |
---|---|
private Map<K,V> |
values |
classId
Constructor and Description |
---|
MapFieldValue(MapDataType type) |
MapFieldValue(MapDataType type,
int initialCapacity) |
Modifier and Type | Method and Description |
---|---|
void |
assign(Object o)
Assign this non-fieldvalue value to this field value.
|
(package private) boolean |
checkAndRemove(FieldValue key,
FieldPathIteratorHandler.ModificationStatus status,
boolean wasModified,
List<FieldValue> keysToRemove) |
void |
clear() |
MapFieldValue |
clone() |
int |
compareTo(FieldValue fieldValue) |
boolean |
contains(Object o) |
boolean |
containsKey(Object key) |
boolean |
containsValue(Object value) |
void |
deserialize(Field field,
FieldReader reader)
Read a field value from the specified reader
|
Set<Map.Entry<K,V>> |
entrySet() |
boolean |
equals(Object o)
Checks if another object is equal to this set.
|
V |
get(Object key) |
MapDataType |
getDataType() |
Object |
getWrappedValue()
Used to retrieve wrapped type for simple types, such that you can use get methods to retrieve ints and floats
directly instead of Int/Float field values.
|
boolean |
isEmpty() |
(package private) FieldPathIteratorHandler.ModificationStatus |
iterateNested(FieldPath fieldPath,
int pos,
FieldPathIteratorHandler handler)
Iterates through the document using the given fieldpath, calling callbacks in the given iterator
handler.
|
(package private) FieldPathIteratorHandler.ModificationStatus |
iterateNested(FieldPath fieldPath,
int pos,
FieldPathIteratorHandler handler,
FieldValue complexFieldValue) |
Set<K> |
keySet() |
void |
printXml(XmlStream xml) |
V |
put(K key,
V value) |
void |
putAll(Map<? extends K,? extends V> m) |
V |
remove(Object key) |
void |
serialize(Field field,
FieldWriter writer)
Write out field value to the specified writer
|
int |
size() |
private void |
validateCompatibleTypes(DataType d,
FieldValue v) |
Collection<V> |
values() |
hashCode, setDataType
checkAssign, create, deserialize, getRecursiveValue, getRecursiveValue, onDeserialize, onSerialize, serialize, toXml
create, createFromId, deserialize, deserializeOptional, deserializeWithId, equals, getClassId, getUtf8, onGetClassId, putUtf8, registerClass, serialize, serializeOptional, serializeWithId, toString, visitMembers
finalize, getClass, notify, notifyAll, wait, wait, wait
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
private Map<K extends FieldValue,V extends FieldValue> values
public MapFieldValue(MapDataType type)
public MapFieldValue(MapDataType type, int initialCapacity)
public MapDataType getDataType()
getDataType
in class CompositeFieldValue
public void assign(Object o)
FieldValue
Override to accept the specific types that should be legal.
assign
in class FieldValue
public MapFieldValue clone()
clone
in class FieldValue
public boolean equals(Object o)
equals
in interface Map<K extends FieldValue,V extends FieldValue>
equals
in class CompositeFieldValue
o
- the object to check for equality withpublic void clear()
clear
in interface Map<K extends FieldValue,V extends FieldValue>
clear
in class FieldValue
public void deserialize(Field field, FieldReader reader)
FieldValue
deserialize
in class FieldValue
public void printXml(XmlStream xml)
printXml
in class FieldValue
public void serialize(Field field, FieldWriter writer)
FieldValue
serialize
in class FieldValue
public Object getWrappedValue()
FieldValue
getWrappedValue
in class FieldValue
public boolean containsKey(Object key)
containsKey
in interface Map<K extends FieldValue,V extends FieldValue>
public boolean containsValue(Object value)
containsValue
in interface Map<K extends FieldValue,V extends FieldValue>
public Set<Map.Entry<K,V>> entrySet()
entrySet
in interface Map<K extends FieldValue,V extends FieldValue>
public V get(Object key)
get
in interface Map<K extends FieldValue,V extends FieldValue>
public Set<K> keySet()
keySet
in interface Map<K extends FieldValue,V extends FieldValue>
private void validateCompatibleTypes(DataType d, FieldValue v)
public V put(K key, V value)
put
in interface Map<K extends FieldValue,V extends FieldValue>
public void putAll(Map<? extends K,? extends V> m)
putAll
in interface Map<K extends FieldValue,V extends FieldValue>
public V remove(Object key)
remove
in interface Map<K extends FieldValue,V extends FieldValue>
public Collection<V> values()
values
in interface Map<K extends FieldValue,V extends FieldValue>
public boolean contains(Object o)
public boolean isEmpty()
isEmpty
in interface Map<K extends FieldValue,V extends FieldValue>
public int size()
size
in interface Map<K extends FieldValue,V extends FieldValue>
boolean checkAndRemove(FieldValue key, FieldPathIteratorHandler.ModificationStatus status, boolean wasModified, List<FieldValue> keysToRemove)
FieldPathIteratorHandler.ModificationStatus iterateNested(FieldPath fieldPath, int pos, FieldPathIteratorHandler handler, FieldValue complexFieldValue)
FieldPathIteratorHandler.ModificationStatus iterateNested(FieldPath fieldPath, int pos, FieldPathIteratorHandler handler)
FieldValue
iterateNested
in class FieldValue
public int compareTo(FieldValue fieldValue)
compareTo
in interface Comparable<FieldValue>
compareTo
in class FieldValue
Copyright © 2017. All rights reserved.