Package org.bson
Class BsonArray
- java.lang.Object
- 
- org.bson.BsonValue
- 
- org.bson.BsonArray
 
 
- 
- 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(int index, BsonValue element)booleanadd(BsonValue bsonValue)booleanaddAll(int index, Collection<? extends BsonValue> c)booleanaddAll(Collection<? extends BsonValue> c)voidclear()BsonArrayclone()booleancontains(Object o)booleancontainsAll(Collection<?> c)booleanequals(Object o)BsonValueget(int index)BsonTypegetBsonType()Gets the BSON type of this value.List<BsonValue>getValues()Gets the values in this array as a list ofBsonValueobjects.inthashCode()intindexOf(Object o)booleanisEmpty()Iterator<BsonValue>iterator()intlastIndexOf(Object o)ListIterator<BsonValue>listIterator()ListIterator<BsonValue>listIterator(int index)static BsonArrayparse(String json)Parses a string in MongoDB Extended JSON format to aBsonArrayBsonValueremove(int index)booleanremove(Object o)booleanremoveAll(Collection<?> c)booleanretainAll(Collection<?> c)BsonValueset(int index, BsonValue element)intsize()List<BsonValue>subList(int fromIndex, int toIndex)Object[]toArray()<T> T[]toArray(T[] a)StringtoString()- 
Methods inherited from class org.bson.BsonValueasArray, 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
 - 
Methods inherited from class java.lang.Objectfinalize, getClass, notify, notifyAll, wait, wait, wait
 - 
Methods inherited from interface java.util.CollectionparallelStream, removeIf, stream, toArray
 - 
Methods inherited from interface java.util.ListreplaceAll, sort, spliterator
 
- 
 
- 
- 
- 
Method Detail- 
parsepublic static BsonArray parse(String json) Parses a string in MongoDB Extended JSON format to aBsonArray- Parameters:
- json- the JSON string
- Returns:
- a corresponding BsonArrayobject
- Since:
- 3.4
- See Also:
- JsonReader
- MongoDB documentation
- MongoDB Extended JSON
 
 - 
getValuespublic List<BsonValue> getValues() Gets the values in this array as a list ofBsonValueobjects.- Returns:
- the values in this array.
 
 - 
getBsonTypepublic BsonType getBsonType() Description copied from class:BsonValueGets the BSON type of this value.- Specified by:
- getBsonTypein class- BsonValue
- Returns:
- the BSON type, which may not be null (but may be BSONType.NULL)
 
 - 
sizepublic int size() 
 - 
isEmptypublic boolean isEmpty() 
 - 
containspublic boolean contains(Object o) 
 - 
toArraypublic Object[] toArray() 
 - 
toArraypublic <T> T[] toArray(T[] a) 
 - 
addpublic boolean add(BsonValue bsonValue) 
 - 
removepublic boolean remove(Object o) 
 - 
containsAllpublic boolean containsAll(Collection<?> c) - Specified by:
- containsAllin interface- Collection<BsonValue>
- Specified by:
- containsAllin interface- List<BsonValue>
 
 - 
addAllpublic boolean addAll(Collection<? extends BsonValue> c) 
 - 
addAllpublic boolean addAll(int index, Collection<? extends BsonValue> c)
 - 
removeAllpublic boolean removeAll(Collection<?> c) 
 - 
retainAllpublic boolean retainAll(Collection<?> c) 
 - 
clearpublic void clear() 
 - 
lastIndexOfpublic int lastIndexOf(Object o) - Specified by:
- lastIndexOfin interface- List<BsonValue>
 
 - 
listIteratorpublic ListIterator<BsonValue> listIterator() - Specified by:
- listIteratorin interface- List<BsonValue>
 
 - 
listIteratorpublic ListIterator<BsonValue> listIterator(int index) - Specified by:
- listIteratorin interface- List<BsonValue>
 
 - 
equalspublic boolean equals(Object o) 
 - 
hashCodepublic int hashCode() 
 
- 
 
-