Enum Constant and Description |
---|
BOOLEAN |
BYTE |
CHAR |
DOUBLE |
ENUM1 |
ENUM2 |
ENUM4 |
FLOAT |
INT |
LONG |
OBJECT |
OPAQUE |
SEQUENCE |
SHORT |
STRING |
STRUCTURE |
Modifier and Type | Method and Description |
---|---|
java.lang.Class |
getClassType() |
java.lang.Class |
getPrimitiveClassType()
The primitive class type: char, byte, float, double, short, int, long, boolean, String, StructureData, StructureDataIterator,
ByteBuffer.
|
int |
getSize()
Size in bytes of one element of this data type.
|
static DataType |
getType(java.lang.Class c)
Find the DataType that matches this class.
|
static DataType |
getType(java.lang.String name)
Find the DataType that matches this name.
|
boolean |
isEnum()
Is this an enumeration types?
|
boolean |
isFloatingPoint()
Is Float or Double
|
boolean |
isIntegral()
Is Byte, Int, Short, or Long
|
boolean |
isNumeric()
Is Byte, Float, Double, Int, Short, or Long
|
boolean |
isString()
Is String or Char
|
static void |
main(java.lang.String[] args) |
java.lang.String |
toString()
The DataType name, eg "byte", "float", "String".
|
static short |
unsignedByteToShort(byte b)
widen an unsigned byte to a short
|
static long |
unsignedIntToLong(int i)
widen an unsigned int to a long
|
static java.lang.String |
unsignedLongToString(long li)
convert an unsigned long to a String
|
static int |
unsignedShortToInt(short s)
widen an unsigned short to an int
|
static DataType |
valueOf(java.lang.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 BOOLEAN
public static final DataType BYTE
public static final DataType CHAR
public static final DataType SHORT
public static final DataType INT
public static final DataType LONG
public static final DataType FLOAT
public static final DataType DOUBLE
public static final DataType SEQUENCE
public static final DataType STRING
public static final DataType STRUCTURE
public static final DataType ENUM1
public static final DataType ENUM2
public static final DataType ENUM4
public static final DataType OPAQUE
public static final DataType OBJECT
public static DataType[] values()
for (DataType c : DataType.values()) System.out.println(c);
public static DataType 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 nullpublic java.lang.String toString()
toString
in class java.lang.Enum<DataType>
public int getSize()
public java.lang.Class getClassType()
public java.lang.Class getPrimitiveClassType()
public boolean isString()
public boolean isNumeric()
public boolean isIntegral()
public boolean isFloatingPoint()
public boolean isEnum()
public static DataType getType(java.lang.String name)
name
- find DataType with this name.public static DataType getType(java.lang.Class c)
c
- primitive or object class, eg float.class or Float.classpublic static java.lang.String unsignedLongToString(long li)
li
- unsigned intpublic static long unsignedIntToLong(int i)
i
- unsigned intpublic static int unsignedShortToInt(short s)
s
- unsigned shortpublic static short unsignedByteToShort(byte b)
b
- unsigned bytepublic static void main(java.lang.String[] args)