Package org.bson
Class LazyBSONList
- java.lang.Object
-
- org.bson.LazyBSONObject
-
- org.bson.LazyBSONList
-
- All Implemented Interfaces:
Iterable<E>
,Collection<E>
,List
,BSONObject
- Direct Known Subclasses:
LazyDBList
public class LazyBSONList extends LazyBSONObject implements List
ALazyBSONObject
representing a BSON array.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
LazyBSONList.LazyBSONListIterator
An 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 void
add(int index, Object element)
boolean
add(Object o)
boolean
addAll(int index, Collection c)
boolean
addAll(Collection c)
void
clear()
boolean
contains(Object o)
boolean
containsAll(Collection collection)
Object
get(int index)
int
indexOf(Object o)
Iterator
iterator()
int
lastIndexOf(Object o)
ListIterator
listIterator()
ListIterator
listIterator(int index)
Object
remove(int index)
boolean
remove(Object o)
boolean
removeAll(Collection c)
boolean
retainAll(Collection c)
Object
set(int index, Object element)
int
size()
List
subList(int fromIndex, int toIndex)
Object[]
toArray()
Object[]
toArray(Object[] a)
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream
-
Methods inherited from class org.bson.LazyBSONObject
containsField, containsKey, entrySet, equals, get, getBSONSize, getBytes, getOffset, hashCode, isEmpty, keySet, pipe, put, putAll, putAll, removeField, toMap
-
-
-
-
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()
-
contains
public boolean contains(Object o)
-
iterator
public Iterator iterator()
-
containsAll
public boolean containsAll(Collection collection)
- Specified by:
containsAll
in interfaceCollection<E extends Object>
- Specified by:
containsAll
in interfaceList
-
lastIndexOf
public int lastIndexOf(Object o)
- Specified by:
lastIndexOf
in interfaceList
-
listIterator
public ListIterator listIterator()
- Specified by:
listIterator
in interfaceList
-
listIterator
public ListIterator listIterator(int index)
- Specified by:
listIterator
in interfaceList
-
add
public boolean add(Object o)
-
remove
public boolean remove(Object o)
-
addAll
public boolean addAll(Collection c)
-
addAll
public boolean addAll(int index, Collection c)
-
removeAll
public boolean removeAll(Collection c)
-
retainAll
public boolean retainAll(Collection c)
-
clear
public void clear()
-
toArray
public Object[] toArray()
-
-