public enum ElementType extends Enum<ElementType>
Enum Constant and Description |
---|
ARRAY
The BSON array type.
|
BINARY
The BSON binary type.
|
BOOLEAN
The BSON boolean type.
|
DB_POINTER
Deprecated.
See BSON specification.
|
DOCUMENT
The BSON document type.
|
DOUBLE
The BSON double type.
|
INTEGER
The BSON 32-bit singed integer type.
|
JAVA_SCRIPT
The BSON JavaScript type.
|
JAVA_SCRIPT_WITH_SCOPE
The BSON JavaScript w/ scope type.
|
LONG
The BSON 32-bit singed integer (long) type.
|
MAX_KEY
The BSON MAX key type.
|
MIN_KEY
The BSON MIN key type.
|
MONGO_TIMESTAMP
The BSON MongoDB Timestamp type.
|
NULL
The BSON null type.
|
OBJECT_ID
The BSON ObjectIdElement type.
|
REGEX
The BSON regular expression type.
|
STRING
The BSON string type.
|
SYMBOL
The BSON Symbol type.
|
UTC_TIMESTAMP
The BSON UTC Timestamp type.
|
Modifier and Type | Method and Description |
---|---|
int |
compare(ElementType rhs)
Similar to
Enum.compareTo(E) but instead of comparing on the ordinal
value compares the values based on the MongoDB sort order. |
byte |
getToken()
Returns the token for the BSON type.
|
static ElementType |
valueOf(byte token)
Returns the ElementType with the provided token or
null if
it is not found. |
static ElementType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ElementType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ElementType ARRAY
public static final ElementType BINARY
public static final ElementType BOOLEAN
@Deprecated public static final ElementType DB_POINTER
public static final ElementType DOCUMENT
public static final ElementType DOUBLE
public static final ElementType INTEGER
public static final ElementType JAVA_SCRIPT
public static final ElementType JAVA_SCRIPT_WITH_SCOPE
public static final ElementType LONG
public static final ElementType MAX_KEY
public static final ElementType MIN_KEY
public static final ElementType MONGO_TIMESTAMP
public static final ElementType NULL
public static final ElementType OBJECT_ID
public static final ElementType REGEX
public static final ElementType STRING
public static final ElementType SYMBOL
public static final ElementType UTC_TIMESTAMP
public static ElementType[] values()
for (ElementType c : ElementType.values()) System.out.println(c);
public static ElementType 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 static ElementType valueOf(byte token)
null
if
it is not found.token
- The BSON type token to find the ElementType for.null
if
it is not found.public int compare(ElementType rhs)
Enum.compareTo(E)
but instead of comparing on the ordinal
value compares the values based on the MongoDB sort order.rhs
- The right-hand-side of the ordering.ElementType
is less than the
rhs
, zero if they are equal, and a positive value if it
is greater than the rhs
.public byte getToken()
Copyright © 2011–2014 Allanbank Consulting, Inc.. All rights reserved.