E - the type of values in the list.@Stability.Volatile public class CouchbaseArrayList<E> extends AbstractList<E>
List backed by a Couchbase document (more
specifically a JSON array).
Note that as such, a CouchbaseArrayList is restricted to the types that a JSON array
can contain. JSON objects and sub-arrays can be represented as JsonObject and JsonArray
respectively.modCount| Constructor and Description |
|---|
CouchbaseArrayList(String id,
Collection collection,
Class<E> entityType,
ArrayListOptions options)
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(int index,
E element) |
void |
clear() |
boolean |
contains(Object o) |
E |
get(int index) |
boolean |
isEmpty() |
Iterator<E> |
iterator() |
ListIterator<E> |
listIterator(int index) |
E |
remove(int index) |
E |
set(int index,
E element) |
int |
size() |
add, addAll, equals, hashCode, indexOf, lastIndexOf, listIterator, removeRange, subListaddAll, containsAll, remove, removeAll, retainAll, toArray, toArray, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitaddAll, containsAll, remove, removeAll, replaceAll, retainAll, sort, spliterator, toArray, toArrayparallelStream, removeIf, streampublic CouchbaseArrayList(String id, Collection collection, Class<E> entityType, ArrayListOptions options)
Couchbase-backed List, backed by the document identified by id
in collection. Note that if the document already exists, its content will be used as initial
content for this collection. Otherwise it is created empty.id - the id of the Couchbase document to back the list.collection - the Collection through which to interact with the document.entityType - a Classoptions - a ArrayListOptions to use for all operations on this instance of the list.public E get(int index)
public int size()
size in interface Collection<E>size in interface List<E>size in class AbstractCollection<E>public boolean isEmpty()
isEmpty in interface Collection<E>isEmpty in interface List<E>isEmpty in class AbstractCollection<E>public void add(int index,
E element)
public E remove(int index)
public boolean contains(Object o)
contains in interface Collection<E>contains in interface List<E>contains in class AbstractCollection<E>public ListIterator<E> listIterator(int index)
listIterator in interface List<E>listIterator in class AbstractList<E>public void clear()
clear in interface Collection<E>clear in interface List<E>clear in class AbstractList<E>Copyright © 2020 Couchbase, Inc.. All rights reserved.