public final class Array<T extends FieldValue> extends CollectionFieldValue<T> implements List<T>
Modifier and Type | Class and Description |
---|---|
(package private) class |
Array.ListWrapper<E>
This wrapper class is used to wrap a list that isn't a list of field
values.
|
FieldValue.RecursiveIteratorHandler
Modifier and Type | Field and Description |
---|---|
private List<T> |
values |
classId
Constructor and Description |
---|
Array(DataType type) |
Array(DataType type,
int initialCapacity) |
Array(DataType type,
List<T> values) |
Modifier and Type | Method and Description |
---|---|
void |
add(int index,
T o) |
boolean |
add(T o) |
boolean |
addAll(Collection<? extends T> c) |
boolean |
addAll(int index,
Collection<? extends T> c) |
void |
assign(Object o)
Assign this non-fieldvalue value to this field value.
|
void |
clear() |
Array<T> |
clone() |
int |
compareTo(FieldValue fieldValue) |
boolean |
contains(Object o) |
boolean |
containsAll(Collection<?> c) |
void |
deserialize(Field field,
FieldReader reader)
Read a field value from the specified reader
|
boolean |
equals(Object o) |
Iterator<T> |
fieldValueIterator() |
T |
get(int index) |
ArrayDataType |
getDataType() |
FieldValue |
getFieldValue(int index) |
List<T> |
getValues() |
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.
|
int |
hashCode() |
int |
indexOf(Object o) |
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 |
iterateSubset(int startPos,
int endPos,
FieldPath fieldPath,
String variable,
int nextPos,
FieldPathIteratorHandler handler) |
Iterator<T> |
iterator() |
int |
lastIndexOf(Object o) |
ListIterator<T> |
listIterator() |
ListIterator<T> |
listIterator(int index) |
void |
printXml(XmlStream xml) |
T |
remove(int index) |
boolean |
remove(Object o) |
boolean |
removeAll(Collection<?> c) |
boolean |
removeValue(FieldValue o) |
boolean |
retainAll(Collection<?> c) |
void |
serialize(Field field,
FieldWriter writer)
Write out field value to the specified writer
|
T |
set(int index,
T o) |
int |
size() |
List<T> |
subList(int fromIndex,
int toIndex) |
Object[] |
toArray() |
<T> T[] |
toArray(T[] a) |
String |
toString() |
createFieldValue, isEmpty, removeValue, verifyElementCompatibility
setDataType
checkAssign, create, deserialize, getRecursiveValue, getRecursiveValue, onDeserialize, onSerialize, serialize, toXml
create, createFromId, deserialize, deserializeOptional, deserializeWithId, equals, getClassId, getUtf8, onGetClassId, putUtf8, registerClass, serialize, serializeOptional, serializeWithId, visitMembers
finalize, getClass, notify, notifyAll, wait, wait, wait
replaceAll, sort, spliterator
parallelStream, removeIf, stream
private List<T extends FieldValue> values
public Array(DataType type)
public Array(DataType type, int initialCapacity)
public ArrayDataType getDataType()
getDataType
in class CollectionFieldValue<T extends FieldValue>
public Iterator<T> fieldValueIterator()
fieldValueIterator
in class CollectionFieldValue<T extends FieldValue>
public Array<T> clone()
clone
in class FieldValue
public void clear()
clear
in interface Collection<T extends FieldValue>
clear
in interface List<T extends FieldValue>
clear
in class FieldValue
public void assign(Object o)
FieldValue
Override to accept the specific types that should be legal.
assign
in class FieldValue
public Object getWrappedValue()
FieldValue
getWrappedValue
in class FieldValue
public FieldValue getFieldValue(int index)
public void printXml(XmlStream xml)
printXml
in class FieldValue
public String toString()
toString
in class com.yahoo.vespa.objects.Identifiable
public int hashCode()
hashCode
in interface Collection<T extends FieldValue>
hashCode
in interface List<T extends FieldValue>
hashCode
in class CompositeFieldValue
public boolean equals(Object o)
equals
in interface Collection<T extends FieldValue>
equals
in interface List<T extends FieldValue>
equals
in class CompositeFieldValue
public void add(int index, T o)
add
in interface List<T extends FieldValue>
public boolean remove(Object o)
remove
in interface Collection<T extends FieldValue>
remove
in interface List<T extends FieldValue>
public boolean add(T o)
add
in interface Collection<T extends FieldValue>
add
in interface List<T extends FieldValue>
add
in class CollectionFieldValue<T extends FieldValue>
public boolean contains(Object o)
contains
in interface Collection<T extends FieldValue>
contains
in interface List<T extends FieldValue>
contains
in class CollectionFieldValue<T extends FieldValue>
public boolean isEmpty()
isEmpty
in interface Collection<T extends FieldValue>
isEmpty
in interface List<T extends FieldValue>
isEmpty
in class CollectionFieldValue<T extends FieldValue>
public Iterator<T> iterator()
iterator
in interface Iterable<T extends FieldValue>
iterator
in interface Collection<T extends FieldValue>
iterator
in interface List<T extends FieldValue>
iterator
in class CollectionFieldValue<T extends FieldValue>
public boolean removeValue(FieldValue o)
removeValue
in class CollectionFieldValue<T extends FieldValue>
public int size()
size
in interface Collection<T extends FieldValue>
size
in interface List<T extends FieldValue>
size
in class CollectionFieldValue<T extends FieldValue>
public boolean addAll(Collection<? extends T> c)
addAll
in interface Collection<T extends FieldValue>
addAll
in interface List<T extends FieldValue>
public boolean containsAll(Collection<?> c)
containsAll
in interface Collection<T extends FieldValue>
containsAll
in interface List<T extends FieldValue>
public Object[] toArray()
toArray
in interface Collection<T extends FieldValue>
toArray
in interface List<T extends FieldValue>
public <T> T[] toArray(T[] a)
toArray
in interface Collection<T extends FieldValue>
toArray
in interface List<T extends FieldValue>
public boolean addAll(int index, Collection<? extends T> c)
addAll
in interface List<T extends FieldValue>
public boolean retainAll(Collection<?> c)
retainAll
in interface Collection<T extends FieldValue>
retainAll
in interface List<T extends FieldValue>
public boolean removeAll(Collection<?> c)
removeAll
in interface Collection<T extends FieldValue>
removeAll
in interface List<T extends FieldValue>
public T get(int index)
get
in interface List<T extends FieldValue>
public int indexOf(Object o)
indexOf
in interface List<T extends FieldValue>
public int lastIndexOf(Object o)
lastIndexOf
in interface List<T extends FieldValue>
public ListIterator<T> listIterator()
listIterator
in interface List<T extends FieldValue>
public ListIterator<T> listIterator(int index)
listIterator
in interface List<T extends FieldValue>
public T remove(int index)
remove
in interface List<T extends FieldValue>
public List<T> subList(int fromIndex, int toIndex)
subList
in interface List<T extends FieldValue>
FieldPathIteratorHandler.ModificationStatus iterateSubset(int startPos, int endPos, FieldPath fieldPath, String variable, int nextPos, FieldPathIteratorHandler handler)
FieldPathIteratorHandler.ModificationStatus iterateNested(FieldPath fieldPath, int pos, FieldPathIteratorHandler handler)
FieldValue
iterateNested
in class FieldValue
public void serialize(Field field, FieldWriter writer)
FieldValue
serialize
in class FieldValue
public void deserialize(Field field, FieldReader reader)
FieldValue
deserialize
in class FieldValue
public int compareTo(FieldValue fieldValue)
compareTo
in interface Comparable<FieldValue>
compareTo
in class FieldValue
Copyright © 2017. All rights reserved.