Package com.mongodb
Class BasicDBList
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<E>
-
- java.util.ArrayList<Object>
-
- org.bson.types.BasicBSONList
-
- com.mongodb.BasicDBList
-
- All Implemented Interfaces:
DBObject
,Serializable
,Cloneable
,Iterable<Object>
,Collection<Object>
,List<Object>
,RandomAccess
,BSONObject
public class BasicDBList extends BasicBSONList implements DBObject
An implementation of List that reflects the way BSON lists work.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class java.util.AbstractList
modCount
-
-
Constructor Summary
Constructors Constructor Description BasicDBList()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
copy()
Copies this instance into a new Object.boolean
isPartialObject()
WhetherDBObject.markAsPartialObject()
was ever called only matters if you are going to upsert and do not want to risk losing fields.void
markAsPartialObject()
If this object was retrieved with only some fields (using a field filter) this method will be called to mark it as such.-
Methods inherited from class org.bson.types.BasicBSONList
containsField, containsKey, get, keySet, put, put, putAll, putAll, removeField, toMap
-
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, equals, forEach, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
-
Methods inherited from class java.util.AbstractCollection
containsAll, toString
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.bson.BSONObject
containsField, containsKey, get, keySet, put, putAll, putAll, removeField, toMap
-
Methods inherited from interface java.util.Collection
parallelStream, stream, toArray
-
Methods inherited from interface java.util.List
containsAll
-
-
-
-
Method Detail
-
isPartialObject
public boolean isPartialObject()
Description copied from interface:DBObject
WhetherDBObject.markAsPartialObject()
was ever called only matters if you are going to upsert and do not want to risk losing fields.- Specified by:
isPartialObject
in interfaceDBObject
- Returns:
- true if this has been marked as a partial object
-
markAsPartialObject
public void markAsPartialObject()
Description copied from interface:DBObject
If this object was retrieved with only some fields (using a field filter) this method will be called to mark it as such.- Specified by:
markAsPartialObject
in interfaceDBObject
-
copy
public Object copy()
Copies this instance into a new Object.- Returns:
- a new BasicDBList with the same values as this instance
-
-