Serializable, Comparable<DataType>public enum DataType extends Enum<DataType>
| 枚举常量 | 说明 |
|---|---|
BOOLEAN |
|
BYTE |
|
CHAR |
|
COMPLEX |
|
DATE |
|
DOUBLE |
|
ENUM1 |
|
ENUM2 |
|
ENUM4 |
|
FLOAT |
|
INT |
|
LONG |
|
OBJECT |
|
OPAQUE |
|
SEQUENCE |
|
SHORT |
|
STRING |
|
STRUCTURE |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
Class |
getClassType() |
|
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(Class c) |
Find the DataType that matches this class.
|
static DataType |
getType(String name) |
Find the DataType that matches this name.
|
boolean |
isBoolean() |
Is Boolean
|
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(String[] args) |
|
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 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(String name) |
返回带有指定名称的该类型的枚举常量。
|
static DataType[] |
values() |
按照声明该枚举类型的常量的顺序, 返回
包含这些常量的数组。
|
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 COMPLEX
public static final DataType DATE
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(String name)
name - 要返回的枚举常量的名称。IllegalArgumentException - 如果该枚举类型没有带有指定名称的常量NullPointerException - 如果参数为空值public String toString()
public int getSize()
public Class getClassType()
public Class getPrimitiveClassType()
public boolean isString()
public boolean isBoolean()
public boolean isNumeric()
public boolean isIntegral()
public boolean isFloatingPoint()
public boolean isEnum()
public static DataType getType(String name)
name - find DataType with this name.public static DataType getType(Class c)
c - primitive or object class, eg float.class or Float.classpublic static 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(String[] args)
Copyright © 2019. All rights reserved.