public enum DataType extends Enum<DataType>
| Enum Constant and Description |
|---|
BOOL |
BOOL_ARRAY |
BYTE |
BYTE_ARRAY |
DOUBLE |
DOUBLE_ARRAY |
END_MARKER |
FLOAT |
FLOAT_ARRAY |
INT |
INT_ARRAY |
LONG |
LONG_ARRAY |
MAP |
SHORT |
SHORT_ARRAY |
STRING |
STRING_ARRAY |
| Modifier and Type | Method and Description |
|---|---|
static DataType |
fromByte(byte value)
Returns the data type matching the given byte representation, if any.
|
static DataType |
fromClassType(Class<?> classType)
Returns the data type matching the given java class type, if any.
|
static DataType |
fromString(String str)
Returns the data type matching the given string representation, if any.
|
byte |
getAsByte()
Returns the byte representation of the data type.
|
String |
getAsString()
Returns the string representation of the data type.
|
Class<?> |
getClassType()
Returns the corresponding java class type matching the given data type
|
long |
getPrimitiveSize() |
boolean |
isScalar() |
String |
toString() |
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 BOOL
public static final DataType BYTE
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 BOOL_ARRAY
public static final DataType BYTE_ARRAY
public static final DataType SHORT_ARRAY
public static final DataType INT_ARRAY
public static final DataType LONG_ARRAY
public static final DataType FLOAT_ARRAY
public static final DataType DOUBLE_ARRAY
public static final DataType STRING_ARRAY
public static final DataType MAP
public static final DataType END_MARKER
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 getAsByte()
public long getPrimitiveSize()
public Class<?> getClassType()
public boolean isScalar()
public String getAsString()
public static DataType fromString(String str)
str - the string to be searchedpublic static DataType fromByte(byte value)
value - the value to be searchedCopyright © 2019 GSI Helmholtzzentrum für Schwerionenforschung GmbH. All rights reserved.