Package com.yahoo.document.datatypes
Class MapFieldValue<K extends FieldValue,V extends FieldValue>
java.lang.Object
com.yahoo.vespa.objects.Selectable
com.yahoo.vespa.objects.Identifiable
com.yahoo.document.datatypes.FieldValue
com.yahoo.document.datatypes.CompositeFieldValue
com.yahoo.document.datatypes.MapFieldValue<K,V>
- All Implemented Interfaces:
Cloneable,Comparable<FieldValue>,Map<K,V>
public class MapFieldValue<K extends FieldValue,V extends FieldValue>
extends CompositeFieldValue
implements Map<K,V>
Vespa map. Backed by and parametrized by FieldValue
- Author:
- vegardh
-
Nested Class Summary
-
Field Summary
Fields inherited from class com.yahoo.document.datatypes.FieldValue
classId -
Constructor Summary
ConstructorsConstructorDescriptionMapFieldValue(MapDataType type) MapFieldValue(MapDataType type, int initialCapacity) -
Method Summary
Modifier and TypeMethodDescriptionvoidAssign this non-fieldvalue value to this field value.voidclear()clone()intcompareTo(FieldValue fieldValue) booleanbooleancontainsKey(Object key) booleancontainsValue(Object value) voiddeserialize(Field field, FieldReader reader) Read a field value from the specified readerentrySet()booleanChecks if another object is equal to this set.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.booleanisEmpty()keySet()voidDeprecated.voidvoidserialize(Field field, FieldWriter writer) Write out field value to the specified writerintsize()values()Methods inherited from class com.yahoo.document.datatypes.CompositeFieldValue
hashCode, setDataTypeMethods inherited from class com.yahoo.document.datatypes.FieldValue
create, deserialize, getRecursiveValue, getRecursiveValue, onDeserialize, onSerialize, serialize, toXmlMethods inherited from class com.yahoo.vespa.objects.Identifiable
create, createFromId, deserialize, deserializeOptional, deserializeWithId, equals, getClassId, getRawUtf8Bytes, getUtf8, onGetClassId, putUtf8, registerClass, registerClass, serialize, serializeOptional, serializeWithId, toString, visitMembersMethods inherited from class com.yahoo.vespa.objects.Selectable
select, select, selectMembersMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Constructor Details
-
MapFieldValue
-
MapFieldValue
-
-
Method Details
-
getDataType
- Overrides:
getDataTypein classCompositeFieldValue
-
assign
Description copied from class:FieldValueAssign this non-fieldvalue value to this field value. This is used to be able to assign ints to Integer field values and List to Array field values and such.Override to accept the specific types that should be legal.
- Specified by:
assignin classFieldValue
-
clone
- Overrides:
clonein classFieldValue
-
equals
Checks if another object is equal to this set.- Specified by:
equalsin interfaceMap<K extends FieldValue,V extends FieldValue> - Overrides:
equalsin classCompositeFieldValue- Parameters:
o- the object to check for equality with- Returns:
- true if o is an instance of WeightedSet and the two encapsulated Maps are equal, false otherwise
-
clear
public void clear()- Specified by:
clearin interfaceMap<K extends FieldValue,V extends FieldValue> - Specified by:
clearin classFieldValue
-
deserialize
Description copied from class:FieldValueRead a field value from the specified reader- Specified by:
deserializein classFieldValue
-
printXml
Deprecated.- Specified by:
printXmlin classFieldValue
-
serialize
Description copied from class:FieldValueWrite out field value to the specified writer- Specified by:
serializein classFieldValue
-
getWrappedValue
Description copied from class:FieldValueUsed 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. Complex types that can't be specified by simple java types just return themselves.- Overrides:
getWrappedValuein classFieldValue
-
containsKey
- Specified by:
containsKeyin interfaceMap<K extends FieldValue,V extends FieldValue>
-
containsValue
- Specified by:
containsValuein interfaceMap<K extends FieldValue,V extends FieldValue>
-
entrySet
- Specified by:
entrySetin interfaceMap<K extends FieldValue,V extends FieldValue>
-
get
- Specified by:
getin interfaceMap<K extends FieldValue,V extends FieldValue>
-
keySet
- Specified by:
keySetin interfaceMap<K extends FieldValue,V extends FieldValue>
-
put
- Specified by:
putin interfaceMap<K extends FieldValue,V extends FieldValue>
-
putAll
- Specified by:
putAllin interfaceMap<K extends FieldValue,V extends FieldValue>
-
remove
- Specified by:
removein interfaceMap<K extends FieldValue,V extends FieldValue>
-
values
- Specified by:
valuesin interfaceMap<K extends FieldValue,V extends FieldValue>
-
contains
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceMap<K extends FieldValue,V extends FieldValue>
-
size
public int size()- Specified by:
sizein interfaceMap<K extends FieldValue,V extends FieldValue>
-
compareTo
- Specified by:
compareToin interfaceComparable<K extends FieldValue>- Overrides:
compareToin classFieldValue
-