public enum BsonType extends Enum<BsonType>
Enum Constant and Description |
---|
ARRAY
A BSON array.
|
BINARY
BSON binary data.
|
BOOLEAN
A BSON bool.
|
DATE_TIME
A BSON DateTime.
|
DB_POINTER
A BSON regular expression.
|
DECIMAL128
A BSON Decimal128.
|
DOCUMENT
A BSON document.
|
DOUBLE
A BSON double.
|
END_OF_DOCUMENT
Not a real BSON type.
|
INT32
A BSON 32-bit integer.
|
INT64
A BSON 64-bit integer.
|
JAVASCRIPT
BSON JavaScript code.
|
JAVASCRIPT_WITH_SCOPE
BSON JavaScript code with a scope (a set of variables with values).
|
MAX_KEY
A BSON MaxKey value.
|
MIN_KEY
A BSON MinKey value.
|
NULL
A BSON null value.
|
OBJECT_ID
A BSON ObjectId.
|
REGULAR_EXPRESSION
A BSON regular expression.
|
STRING
A BSON string.
|
SYMBOL
A BSON symbol.
|
TIMESTAMP
A BSON timestamp.
|
UNDEFINED
A BSON undefined value.
|
Modifier and Type | Method and Description |
---|---|
static BsonType |
findByValue(int value)
Gets the
BsonType that corresponds to the given int value. |
int |
getValue()
Get the int value of this BSON type.
|
boolean |
isContainer()
Returns whether this type is some sort of containing type, e.g.
|
static BsonType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static BsonType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final BsonType END_OF_DOCUMENT
public static final BsonType DOUBLE
public static final BsonType STRING
public static final BsonType DOCUMENT
public static final BsonType ARRAY
public static final BsonType BINARY
public static final BsonType UNDEFINED
public static final BsonType OBJECT_ID
public static final BsonType BOOLEAN
public static final BsonType DATE_TIME
public static final BsonType NULL
public static final BsonType REGULAR_EXPRESSION
public static final BsonType DB_POINTER
public static final BsonType JAVASCRIPT
public static final BsonType SYMBOL
public static final BsonType JAVASCRIPT_WITH_SCOPE
public static final BsonType INT32
public static final BsonType TIMESTAMP
public static final BsonType INT64
public static final BsonType DECIMAL128
public static final BsonType MIN_KEY
public static final BsonType MAX_KEY
public static BsonType[] values()
for (BsonType c : BsonType.values()) System.out.println(c);
public static BsonType valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic int getValue()
public static BsonType findByValue(int value)
BsonType
that corresponds to the given int value.value
- the int value of the desired BSON type.BsonType
public boolean isContainer()