public class BsonArray extends BsonValue implements java.util.List<BsonValue>, java.lang.Cloneable
Constructor and Description |
---|
BsonArray()
Construct an empty BsonArray
|
BsonArray(java.util.List<? extends BsonValue> values)
Construct an instance with the given list of values.
|
Modifier and Type | Method and Description |
---|---|
boolean |
add(BsonValue bsonValue) |
void |
add(int index,
BsonValue element) |
boolean |
addAll(java.util.Collection<? extends BsonValue> c) |
boolean |
addAll(int index,
java.util.Collection<? extends BsonValue> c) |
void |
clear() |
BsonArray |
clone() |
boolean |
contains(java.lang.Object o) |
boolean |
containsAll(java.util.Collection<?> c) |
boolean |
equals(java.lang.Object o) |
BsonValue |
get(int index) |
BsonType |
getBsonType()
Gets the BSON type of this value.
|
java.util.List<BsonValue> |
getValues()
Gets the values in this array as a list of
BsonValue objects. |
int |
hashCode() |
int |
indexOf(java.lang.Object o) |
boolean |
isEmpty() |
java.util.Iterator<BsonValue> |
iterator() |
int |
lastIndexOf(java.lang.Object o) |
java.util.ListIterator<BsonValue> |
listIterator() |
java.util.ListIterator<BsonValue> |
listIterator(int index) |
static BsonArray |
parse(java.lang.String json)
Parses a string in MongoDB Extended JSON format to a
BsonArray |
BsonValue |
remove(int index) |
boolean |
remove(java.lang.Object o) |
boolean |
removeAll(java.util.Collection<?> c) |
boolean |
retainAll(java.util.Collection<?> c) |
BsonValue |
set(int index,
BsonValue element) |
int |
size() |
java.util.List<BsonValue> |
subList(int fromIndex,
int toIndex) |
java.lang.Object[] |
toArray() |
<T> T[] |
toArray(T[] a) |
java.lang.String |
toString() |
asArray, asBinary, asBoolean, asDateTime, asDBPointer, asDecimal128, asDocument, asDouble, asInt32, asInt64, asJavaScript, asJavaScriptWithScope, asNumber, asObjectId, asRegularExpression, asString, asSymbol, asTimestamp, isArray, isBinary, isBoolean, isDateTime, isDBPointer, isDecimal128, isDocument, isDouble, isInt32, isInt64, isJavaScript, isJavaScriptWithScope, isNull, isNumber, isObjectId, isRegularExpression, isString, isSymbol, isTimestamp
public BsonArray(java.util.List<? extends BsonValue> values)
values
- the list of values, none of whose members may be null.public BsonArray()
public static BsonArray parse(java.lang.String json)
BsonArray
json
- the JSON stringBsonArray
objectJsonReader
public java.util.List<BsonValue> getValues()
BsonValue
objects.public BsonType getBsonType()
BsonValue
getBsonType
in class BsonValue
public int size()
public boolean isEmpty()
public boolean contains(java.lang.Object o)
public java.util.Iterator<BsonValue> iterator()
public java.lang.Object[] toArray()
public <T> T[] toArray(T[] a)
public boolean add(BsonValue bsonValue)
public boolean remove(java.lang.Object o)
public boolean containsAll(java.util.Collection<?> c)
public boolean addAll(java.util.Collection<? extends BsonValue> c)
public boolean addAll(int index, java.util.Collection<? extends BsonValue> c)
addAll
in interface java.util.List<BsonValue>
public boolean removeAll(java.util.Collection<?> c)
public boolean retainAll(java.util.Collection<?> c)
public void clear()
public BsonValue set(int index, BsonValue element)
set
in interface java.util.List<BsonValue>
public void add(int index, BsonValue element)
add
in interface java.util.List<BsonValue>
public BsonValue remove(int index)
remove
in interface java.util.List<BsonValue>
public int indexOf(java.lang.Object o)
indexOf
in interface java.util.List<BsonValue>
public int lastIndexOf(java.lang.Object o)
lastIndexOf
in interface java.util.List<BsonValue>
public java.util.ListIterator<BsonValue> listIterator()
listIterator
in interface java.util.List<BsonValue>
public java.util.ListIterator<BsonValue> listIterator(int index)
listIterator
in interface java.util.List<BsonValue>
public java.util.List<BsonValue> subList(int fromIndex, int toIndex)
subList
in interface java.util.List<BsonValue>
public boolean equals(java.lang.Object o)
public int hashCode()
public java.lang.String toString()
toString
in class java.lang.Object
public BsonArray clone()
clone
in class java.lang.Object
Copyright © 2010 - 2020 Adobe. All Rights Reserved