public class BsonElement
extends java.lang.Object
BsonDocument
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
name |
private BsonValue |
value |
Constructor and Description |
---|
BsonElement(java.lang.String name,
BsonValue value)
Construct a new instance with the given key and value
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getName()
Gets the name of the key/field.
|
BsonValue |
getValue()
Gets the value of this element.
|
private final java.lang.String name
private final BsonValue value
public BsonElement(java.lang.String name, BsonValue value)
name
- the non-null keyvalue
- the non-null valuepublic java.lang.String getName()
public BsonValue getValue()
BsonValue
containing the value of this element.