|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectucar.ma2.DataType
public class DataType
Type-safe enumeration of data types.
| Field Summary | |
|---|---|
static DataType |
BOOLEAN
|
static DataType |
BYTE
|
static DataType |
CHAR
|
static DataType |
DOUBLE
|
static DataType |
FLOAT
|
static DataType |
INT
|
static DataType |
LONG
|
static DataType |
SHORT
|
static DataType |
STRING
|
static DataType |
STRUCTURE
|
| Method Summary | |
|---|---|
java.lang.Class |
getClassType()
The Object class type: Character, Byte, Float, Double, Short, Integer, Boolean, Long, String, StructureData. |
java.lang.Class |
getPrimitiveClassType()
The primitive class type: char, byte, float, double, short, int, long, boolean, String, StructureData. |
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. |
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 |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field 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 STRING
public static final DataType STRUCTURE
| Method Detail |
|---|
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 java.lang.String toString()
toString in class java.lang.Objectpublic int getSize()
public java.lang.Class getPrimitiveClassType()
public java.lang.Class getClassType()
public static long unsignedIntToLong(int i)
public static int unsignedShortToInt(short s)
public static short unsignedByteToShort(byte b)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||