Serializable
, Comparable<DataType>
public enum DataType extends Enum<DataType>
Enum Constant | Description |
---|---|
ATTRIBUTE |
data holds an attribute resource identifier. |
DIMENSION |
data holds a complex number encoding a dimension value, such as "100in". |
DYNAMIC_ATTRIBUTE |
data holds an attribute resource identifier, which needs to be resolved
before it can be used like a TYPE_ATTRIBUTE. |
DYNAMIC_REFERENCE |
data holds a dynamic ResourceTableChunk entry reference. |
FLOAT |
data holds a single-precision floating point number. |
FRACTION |
data holds a complex number encoding a fraction of a container. |
INT_BOOLEAN |
data is either 0 (false) or 1 (true). |
INT_COLOR_ARGB4 |
data is a raw integer value of the form #argb. |
INT_COLOR_ARGB8 |
data is a raw integer value of the form #aarrggbb. |
INT_COLOR_RGB4 |
data is a raw integer value of the form #rgb. |
INT_COLOR_RGB8 |
data is a raw integer value of the form #rrggbb. |
INT_DEC |
data is a raw integer value of the form n..n. |
INT_HEX |
data is a raw integer value of the form 0xn..n. |
NULL |
data is either 0 (undefined) or 1 (empty). |
REFERENCE |
data holds a ResourceTableChunk entry reference. |
STRING |
data holds an index into the containing resource table's string pool. |
Modifier and Type | Field | Description |
---|---|---|
static int |
TYPE_FIRST_INT |
|
static int |
TYPE_LAST_INT |
Modifier and Type | Method | Description |
---|---|---|
byte |
code() |
|
static DataType |
fromCode(byte code) |
|
static DataType |
fromCode(int code) |
|
static DataType |
valueOf(String name) |
Returns the enum constant of this type with the specified name.
|
static DataType[] |
values() |
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final DataType NULL
data
is either 0 (undefined) or 1 (empty).public static final DataType REFERENCE
data
holds a ResourceTableChunk
entry reference.public static final DataType ATTRIBUTE
data
holds an attribute resource identifier.public static final DataType STRING
data
holds an index into the containing resource table's string pool.public static final DataType FLOAT
data
holds a single-precision floating point number.public static final DataType DIMENSION
data
holds a complex number encoding a dimension value, such as "100in".public static final DataType FRACTION
data
holds a complex number encoding a fraction of a container.public static final DataType DYNAMIC_REFERENCE
data
holds a dynamic ResourceTableChunk
entry reference.public static final DataType DYNAMIC_ATTRIBUTE
data
holds an attribute resource identifier, which needs to be resolved
before it can be used like a TYPE_ATTRIBUTE.public static final DataType INT_DEC
data
is a raw integer value of the form n..n.public static final DataType INT_HEX
data
is a raw integer value of the form 0xn..n.public static final DataType INT_BOOLEAN
data
is either 0 (false) or 1 (true).public static final DataType INT_COLOR_ARGB8
data
is a raw integer value of the form #aarrggbb.public static final DataType INT_COLOR_RGB8
data
is a raw integer value of the form #rrggbb.public static final DataType INT_COLOR_ARGB4
data
is a raw integer value of the form #argb.public static final DataType INT_COLOR_RGB4
data
is a raw integer value of the form #rgb.public static final int TYPE_FIRST_INT
public static final int TYPE_LAST_INT
public static DataType[] values()
for (DataType c : DataType.values()) System.out.println(c);
public static DataType 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 byte code()
public static DataType fromCode(int code)
public static DataType fromCode(byte code)