Constructor | Description |
---|---|
BsonArray() |
Construct an empty BsonArray
|
BsonArray(List<? extends BsonValue> values) |
Construct an instance with the given list of values.
|
Modifier and Type | Method | Description |
---|---|---|
void |
add(int index,
BsonValue element) |
|
boolean |
add(BsonValue bsonValue) |
|
boolean |
addAll(int index,
Collection<? extends BsonValue> c) |
|
boolean |
addAll(Collection<? extends BsonValue> c) |
|
void |
clear() |
|
BsonArray |
clone() |
|
boolean |
contains(Object o) |
|
boolean |
containsAll(Collection<?> c) |
|
boolean |
equals(Object o) |
|
BsonValue |
get(int index) |
|
BsonType |
getBsonType() |
Gets the BSON type of this value.
|
List<BsonValue> |
getValues() |
Gets the values in this array as a list of
BsonValue objects. |
int |
hashCode() |
|
int |
indexOf(Object o) |
|
boolean |
isEmpty() |
|
Iterator<BsonValue> |
iterator() |
|
int |
lastIndexOf(Object o) |
|
ListIterator<BsonValue> |
listIterator() |
|
ListIterator<BsonValue> |
listIterator(int index) |
|
static BsonArray |
parse(String json) |
Parses a string in MongoDB Extended JSON format to a
BsonArray |
BsonValue |
remove(int index) |
|
boolean |
remove(Object o) |
|
boolean |
removeAll(Collection<?> c) |
|
boolean |
retainAll(Collection<?> c) |
|
BsonValue |
set(int index,
BsonValue element) |
|
int |
size() |
|
List<BsonValue> |
subList(int fromIndex,
int toIndex) |
|
Object[] |
toArray() |
|
<T> T[] |
toArray(T[] a) |
|
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
parallelStream, removeIf, stream
public BsonArray(List<? extends BsonValue> values)
values
- the list of values, none of whose members may be null.public BsonArray()
public static BsonArray parse(String json)
BsonArray
json
- the JSON stringBsonArray
objectJsonReader
public List<BsonValue> getValues()
BsonValue
objects.public BsonType getBsonType()
BsonValue
getBsonType
in class BsonValue
public int size()
public boolean isEmpty()
public boolean contains(Object o)
public Object[] toArray()
public <T> T[] toArray(T[] a)
public boolean add(BsonValue bsonValue)
public boolean remove(Object o)
public boolean containsAll(Collection<?> c)
containsAll
in interface Collection<BsonValue>
containsAll
in interface List<BsonValue>
public boolean addAll(Collection<? extends BsonValue> c)
public boolean addAll(int index, Collection<? extends BsonValue> c)
public boolean removeAll(Collection<?> c)
public boolean retainAll(Collection<?> c)
public void clear()
public int lastIndexOf(Object o)
lastIndexOf
in interface List<BsonValue>
public ListIterator<BsonValue> listIterator()
listIterator
in interface List<BsonValue>
public ListIterator<BsonValue> listIterator(int index)
listIterator
in interface List<BsonValue>
public boolean equals(Object o)
public int hashCode()