Package org.bson
Class LazyBSONList
- java.lang.Object
-
- org.bson.LazyBSONObject
-
- org.bson.LazyBSONList
-
- All Implemented Interfaces:
Iterable,Collection,List,BSONObject
- Direct Known Subclasses:
LazyDBList
public class LazyBSONList extends LazyBSONObject implements List
ALazyBSONObjectrepresenting a BSON array.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classLazyBSONList.LazyBSONListIteratorAn iterator over the values in a LazyBsonList.
-
Constructor Summary
Constructors Constructor Description LazyBSONList(byte[] bytes, int offset, LazyBSONCallback callback)Construct an instance with the given raw bytes and offset.LazyBSONList(byte[] bytes, LazyBSONCallback callback)Construct an instance with the given raw bytes and offset.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(int index, Object element)booleanadd(Object o)booleanaddAll(int index, Collection c)booleanaddAll(Collection c)voidclear()booleancontains(Object o)booleancontainsAll(Collection collection)Objectget(int index)intindexOf(Object o)Iteratoriterator()intlastIndexOf(Object o)ListIteratorlistIterator()ListIteratorlistIterator(int index)Objectremove(int index)booleanremove(Object o)booleanremoveAll(Collection c)booleanretainAll(Collection c)Objectset(int index, Object element)intsize()ListsubList(int fromIndex, int toIndex)Object[]toArray()Object[]toArray(Object[] a)-
Methods inherited from class org.bson.LazyBSONObject
containsField, containsKey, entrySet, equals, get, getBSONSize, getBytes, getOffset, hashCode, isEmpty, keySet, pipe, put, putAll, putAll, removeField, toMap
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Methods inherited from interface java.util.List
equals, hashCode, isEmpty, replaceAll, sort, spliterator
-
-
-
-
Constructor Detail
-
LazyBSONList
public LazyBSONList(byte[] bytes, LazyBSONCallback callback)Construct an instance with the given raw bytes and offset.- Parameters:
bytes- the raw BSON bytescallback- the callback to use to create nested values
-
LazyBSONList
public LazyBSONList(byte[] bytes, int offset, LazyBSONCallback callback)Construct an instance with the given raw bytes and offset.- Parameters:
bytes- the raw BSON bytesoffset- the offset into the raw bytescallback- the callback to use to create nested values
-
-
Method Detail
-
size
public int size()
- Specified by:
sizein interfaceCollection- Specified by:
sizein interfaceList
-
contains
public boolean contains(Object o)
- Specified by:
containsin interfaceCollection- Specified by:
containsin interfaceList
-
iterator
public Iterator iterator()
-
containsAll
public boolean containsAll(Collection collection)
- Specified by:
containsAllin interfaceCollection- Specified by:
containsAllin interfaceList
-
lastIndexOf
public int lastIndexOf(Object o)
- Specified by:
lastIndexOfin interfaceList
-
listIterator
public ListIterator listIterator()
- Specified by:
listIteratorin interfaceList
-
listIterator
public ListIterator listIterator(int index)
- Specified by:
listIteratorin interfaceList
-
add
public boolean add(Object o)
- Specified by:
addin interfaceCollection- Specified by:
addin interfaceList
-
remove
public boolean remove(Object o)
- Specified by:
removein interfaceCollection- Specified by:
removein interfaceList
-
addAll
public boolean addAll(Collection c)
- Specified by:
addAllin interfaceCollection- Specified by:
addAllin interfaceList
-
addAll
public boolean addAll(int index, Collection c)
-
removeAll
public boolean removeAll(Collection c)
- Specified by:
removeAllin interfaceCollection- Specified by:
removeAllin interfaceList
-
retainAll
public boolean retainAll(Collection c)
- Specified by:
retainAllin interfaceCollection- Specified by:
retainAllin interfaceList
-
clear
public void clear()
- Specified by:
clearin interfaceCollection- Specified by:
clearin interfaceList
-
toArray
public Object[] toArray()
- Specified by:
toArrayin interfaceCollection- Specified by:
toArrayin interfaceList
-
-