DBObject
BasicBSONList
, BasicBSONObject
, BasicDBList
, BasicDBObject
, CommandResult
, GridFSDBFile
, GridFSFile
, GridFSInputFile
, LazyBSONList
, LazyBSONObject
, LazyDBList
, LazyDBObject
, ReflectionDBObject
public interface BSONObject
Modifier and Type | Method | Description |
---|---|---|
boolean |
containsFieldβ(String s) |
Checks if this object contains a field with the given name.
|
boolean |
containsKeyβ(String key) |
Deprecated.
Please use
containsField(String) instead |
Object |
getβ(String key) |
Gets a field from this object by a given name.
|
Set<String> |
keySetβ() |
Returns this object's fields' names
|
Object |
putβ(String key,
Object v) |
Sets a name/value pair in this object.
|
void |
putAllβ(Map m) |
Sets all key/value pairs from a map into this object
|
void |
putAllβ(BSONObject o) |
Sets all key/value pairs from an object into this object
|
Object |
removeFieldβ(String key) |
Removes a field with a given name from this object.
|
Map |
toMapβ() |
Returns a map representing this BSONObject.
|
Object putβ(String key, Object v)
key
- Name to setv
- Corresponding valuevoid putAllβ(BSONObject o)
o
- the objectvoid putAllβ(Map m)
m
- the mapObject getβ(String key)
key
- The name of the field fetchMap toMapβ()
Object removeFieldβ(String key)
key
- The name of the field to remove@Deprecated boolean containsKeyβ(String key)
containsField(String)
insteadkey
- the key to checkboolean containsFieldβ(String s)
s
- Field name for which to check