Package com.yahoo.document.datatypes
Class Array<T 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.CollectionFieldValue<T>
com.yahoo.document.datatypes.Array<T>
- All Implemented Interfaces:
Cloneable,Comparable<FieldValue>,Iterable<T>,Collection<T>,List<T>
FieldValue which encapsulates an Array value
- Author:
- Einar M R Rosenvinge
-
Field Summary
Fields inherited from class com.yahoo.document.datatypes.FieldValue
classId -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbooleanbooleanaddAll(int index, Collection<? extends T> c) booleanaddAll(Collection<? extends T> c) voidAssign this non-fieldvalue value to this field value.voidclear()clone()intcompareTo(FieldValue fieldValue) booleanbooleancontainsAll(Collection<?> c) voiddeserialize(Field field, FieldReader reader) Read a field value from the specified readerbooleanget(int index) getFieldValue(int index) 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.inthashCode()intbooleanisEmpty()iterator()intlistIterator(int index) voidDeprecated.remove(int index) booleanbooleanremoveAll(Collection<?> c) booleanbooleanretainAll(Collection<?> c) voidserialize(Field field, FieldWriter writer) Write out field value to the specified writerintsize()subList(int fromIndex, int toIndex) Object[]toArray()<T> T[]toArray(T[] a) toString()Methods inherited from class com.yahoo.document.datatypes.CollectionFieldValue
createFieldValue, isEmpty, removeValue, verifyElementCompatibilityMethods inherited from class com.yahoo.document.datatypes.CompositeFieldValue
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, 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.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface java.util.List
replaceAll, sort, spliterator
-
Constructor Details
-
Array
-
Array
-
Array
-
-
Method Details
-
getDataType
- Overrides:
getDataTypein classCollectionFieldValue<T extends FieldValue>
-
fieldValueIterator
- Specified by:
fieldValueIteratorin classCollectionFieldValue<T extends FieldValue>
-
clone
- Overrides:
clonein classFieldValue
-
clear
public void clear()- Specified by:
clearin interfaceCollection<T extends FieldValue>- Specified by:
clearin interfaceList<T extends FieldValue>- Specified by:
clearin classFieldValue
-
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
-
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
-
getValues
-
getFieldValue
-
printXml
Deprecated.- Specified by:
printXmlin classFieldValue
-
toString
- Overrides:
toStringin classcom.yahoo.vespa.objects.Identifiable
-
hashCode
public int hashCode()- Specified by:
hashCodein interfaceCollection<T extends FieldValue>- Specified by:
hashCodein interfaceList<T extends FieldValue>- Overrides:
hashCodein classCompositeFieldValue
-
equals
- Specified by:
equalsin interfaceCollection<T extends FieldValue>- Specified by:
equalsin interfaceList<T extends FieldValue>- Overrides:
equalsin classCompositeFieldValue
-
add
- Specified by:
addin interfaceList<T extends FieldValue>
-
remove
- Specified by:
removein interfaceCollection<T extends FieldValue>- Specified by:
removein interfaceList<T extends FieldValue>
-
add
- Specified by:
addin interfaceCollection<T extends FieldValue>- Specified by:
addin interfaceList<T extends FieldValue>- Specified by:
addin classCollectionFieldValue<T extends FieldValue>
-
contains
- Specified by:
containsin interfaceCollection<T extends FieldValue>- Specified by:
containsin interfaceList<T extends FieldValue>- Specified by:
containsin classCollectionFieldValue<T extends FieldValue>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceCollection<T extends FieldValue>- Specified by:
isEmptyin interfaceList<T extends FieldValue>- Specified by:
isEmptyin classCollectionFieldValue<T extends FieldValue>
-
iterator
- Specified by:
iteratorin interfaceCollection<T extends FieldValue>- Specified by:
iteratorin interfaceIterable<T extends FieldValue>- Specified by:
iteratorin interfaceList<T extends FieldValue>- Specified by:
iteratorin classCollectionFieldValue<T extends FieldValue>
-
removeValue
- Specified by:
removeValuein classCollectionFieldValue<T extends FieldValue>
-
size
public int size()- Specified by:
sizein interfaceCollection<T extends FieldValue>- Specified by:
sizein interfaceList<T extends FieldValue>- Specified by:
sizein classCollectionFieldValue<T extends FieldValue>
-
addAll
- Specified by:
addAllin interfaceCollection<T extends FieldValue>- Specified by:
addAllin interfaceList<T extends FieldValue>
-
containsAll
- Specified by:
containsAllin interfaceCollection<T extends FieldValue>- Specified by:
containsAllin interfaceList<T extends FieldValue>
-
toArray
- Specified by:
toArrayin interfaceCollection<T extends FieldValue>- Specified by:
toArrayin interfaceList<T extends FieldValue>
-
toArray
public <T> T[] toArray(T[] a) - Specified by:
toArrayin interfaceCollection<T extends FieldValue>- Specified by:
toArrayin interfaceList<T extends FieldValue>
-
addAll
- Specified by:
addAllin interfaceList<T extends FieldValue>
-
retainAll
- Specified by:
retainAllin interfaceCollection<T extends FieldValue>- Specified by:
retainAllin interfaceList<T extends FieldValue>
-
removeAll
- Specified by:
removeAllin interfaceCollection<T extends FieldValue>- Specified by:
removeAllin interfaceList<T extends FieldValue>
-
get
- Specified by:
getin interfaceList<T extends FieldValue>
-
indexOf
- Specified by:
indexOfin interfaceList<T extends FieldValue>
-
lastIndexOf
- Specified by:
lastIndexOfin interfaceList<T extends FieldValue>
-
listIterator
- Specified by:
listIteratorin interfaceList<T extends FieldValue>
-
listIterator
- Specified by:
listIteratorin interfaceList<T extends FieldValue>
-
remove
- Specified by:
removein interfaceList<T extends FieldValue>
-
set
- Specified by:
setin interfaceList<T extends FieldValue>
-
subList
- Specified by:
subListin interfaceList<T extends FieldValue>
-
serialize
Description copied from class:FieldValueWrite out field value to the specified writer- Specified by:
serializein classFieldValue
-
deserialize
Description copied from class:FieldValueRead a field value from the specified reader- Specified by:
deserializein classFieldValue
-
compareTo
- Specified by:
compareToin interfaceComparable<T extends FieldValue>- Overrides:
compareToin classFieldValue
-