E - the type of values in the list.@InterfaceStability.Committed @InterfaceAudience.Public 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,
Bucket bucket)
|
CouchbaseArrayList(String id,
Bucket bucket,
Collection<? extends E> content)
|
CouchbaseArrayList(String id,
Bucket bucket,
E... content)
|
| 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() |
ListIterator<E> |
listIterator(int index) |
E |
remove(int index) |
E |
set(int index,
E element) |
int |
size() |
add, addAll, equals, hashCode, indexOf, lastIndexOf, 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, Bucket bucket)
Couchbase-backed List, backed by the document identified by id
in bucket. 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.bucket - the Bucket through which to interact with the document.public CouchbaseArrayList(String id, Bucket bucket, E... content)
Couchbase-backed List, backed by the document identified by id
in bucket. Note that if the document already exists, its content is reset to the values
provided.
Note that if you don't provide any value as a vararg, the CouchbaseArrayList(String, Bucket)
constructor will be invoked instead, which will use pre-existing values as content. To create a new
List and force it to be empty, use CouchbaseArrayList(String, Bucket, Collection) with an empty
collection.id - the id of the Couchbase document to back the list.bucket - the Bucket through which to interact with the document.content - vararg of the elements to initially store in the List.public CouchbaseArrayList(String id, Bucket bucket, Collection<? extends E> content)
Couchbase-backed List, backed by the document identified by id
in bucket. Note that if the document already exists, its content is reset to the values
provided in the content Collection.id - the id of the Couchbase document to back the list.bucket - the Bucket through which to interact with the document.content - collection of the elements to initially store in 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()
listIterator in interface List<E>listIterator in class AbstractList<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 © 2015 Couchbase, Inc.