|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Objectjava.lang.Enum<DataType>
ucar.ma2.DataType
public enum DataType
Type-safe enumeration of data types.
Enum Constant Summary | |
---|---|
BOOLEAN
|
|
BYTE
|
|
CHAR
|
|
DOUBLE
|
|
ENUM1
|
|
ENUM2
|
|
ENUM4
|
|
FLOAT
|
|
INT
|
|
LONG
|
|
OPAQUE
|
|
SEQUENCE
|
|
SHORT
|
|
STRING
|
|
STRUCTURE
|
Method Summary | |
---|---|
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 |
isIntegral()
Is Byte, Int, Short, or Long |
boolean |
isNumeric()
Is Byte, Float, Double, Int, Short, or Long |
boolean |
isString()
Is String or Char |
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 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. |
Methods inherited from class java.lang.Enum |
---|
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, valueOf |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail |
---|
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
Method Detail |
---|
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 name
java.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 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.class
public static long unsignedIntToLong(int i)
i
- unsigned int
public static int unsignedShortToInt(short s)
s
- unsigned short
public static short unsignedByteToShort(byte b)
b
- unsigned byte
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |