public static enum DbxFields.ValueType extends java.lang.Enum<DbxFields.ValueType>
DbxFields.AtomType
which is the
more limited set of values which can be included in lists.
Fields must be read using the appropriate typed method on DbxFields
or DbxList
. Automatic conversion is provided if you request a double
value
from a long
field (not the reverse), but no other type conversion is performed.
Values have a sort order based on their type. LONG
, DOUBLE
,
BOOLEAN
, and DATE
values are ordered by their numerical value.
STRING
, BYTES
, and LIST
values are lexicographically ordered.
LONG
and DOUBLE
values are compared to each other by casting to
double
. Other values of distinct types are ordered by type, in the order that
they are listed here. For example, all BOOL
values are ordered before
all numeric (LONG
and DOUBLE
) values.
Enum Constant and Description |
---|
BOOLEAN
A datastore value corresponding to a Java
boolean . |
BYTES
A datastore value holding arbitrary bytes, accessed as
a
byte[] . |
DATE
A datastore value corresponding to a Java
Date . |
DOUBLE
A datastore value corresponding to a Java
double . |
LIST
A datastore value that can hold a list of atomic values
(those taken from the types in
DbxFields.AtomType ). |
LONG
A datastore value corresponding to a Java
long . |
STRING
A datastore value corresponding to a Java
String . |
Modifier and Type | Method and Description |
---|---|
static DbxFields.ValueType |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static DbxFields.ValueType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final DbxFields.ValueType BOOLEAN
boolean
.public static final DbxFields.ValueType LONG
long
.
A long
value will be automatically converted to
a double
if requested (but not the reverse).public static final DbxFields.ValueType DOUBLE
double
.public static final DbxFields.ValueType STRING
String
. Strings
in a datastore are stored in a UTF-8 encoding.public static final DbxFields.ValueType BYTES
byte[]
.public static final DbxFields.ValueType DATE
Date
.public static final DbxFields.ValueType LIST
DbxFields.AtomType
).
Lists need not be homogeneous: they can hold elements of
multiple types.public static DbxFields.ValueType[] values()
for (DbxFields.ValueType c : DbxFields.ValueType.values()) System.out.println(c);
public static DbxFields.ValueType valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant
with the specified namejava.lang.NullPointerException
- if the argument is null