org.bson
Class KeyCachingLazyBSONObject
java.lang.Object
org.bson.LazyBSONObject
org.bson.KeyCachingLazyBSONObject
- All Implemented Interfaces:
- BSONObject
public class KeyCachingLazyBSONObject
- extends LazyBSONObject
- Author:
- brendan, scotthernandez
Method Summary |
boolean |
containsField(String s)
Checks if this object contains a field with the given name. |
Object |
get(String key)
Gets a field from this object by a given name. |
Methods inherited from class org.bson.LazyBSONObject |
containsKey, getBSONSize, getElementBSONSize, getElementType, getElementValue, isElementEmpty, isEmpty, keySet, put, putAll, putAll, removeField, sizeCString, toMap, toString |
KeyCachingLazyBSONObject
public KeyCachingLazyBSONObject(byte[] data,
LazyBSONCallback cbk)
KeyCachingLazyBSONObject
public KeyCachingLazyBSONObject(byte[] data,
int offset,
LazyBSONCallback cbk)
KeyCachingLazyBSONObject
public KeyCachingLazyBSONObject(BSONByteBuffer buffer,
LazyBSONCallback callback)
KeyCachingLazyBSONObject
public KeyCachingLazyBSONObject(BSONByteBuffer buffer,
int offset,
LazyBSONCallback callback)
get
public Object get(String key)
- Description copied from interface:
BSONObject
- Gets a field from this object by a given name.
- Specified by:
get
in interface BSONObject
- Overrides:
get
in class LazyBSONObject
- Parameters:
key
- The name of the field fetch
- Returns:
- The field, if found
containsField
public boolean containsField(String s)
- Description copied from interface:
BSONObject
- Checks if this object contains a field with the given name.
- Specified by:
containsField
in interface BSONObject
- Overrides:
containsField
in class LazyBSONObject
- Parameters:
s
- Field name for which to check
- Returns:
- True if the field is present