public enum PrimitiveType extends Enum<PrimitiveType>
Enum Constant and Description |
---|
CHAR
One byte character type which is a flavour of ASCII.
|
DOUBLE
A 64-bit double precision floating point number.
|
FLOAT
A 32-bit single precision floating point number.
|
INT16
A 16-bit signed integer.
|
INT32
A 32-bit signed integer.
|
INT64
A 64-bit signed integer.
|
INT8
A raw byte or signed 8-bit integer.
|
UINT16
A 16-bit unsigned integer.
|
UINT32
A 32-bit unsigned integer.
|
UINT64
A 64-bit unsigned integer.
|
UINT8
A 8-bit unsigned integer.
|
Modifier and Type | Method and Description |
---|---|
static PrimitiveType |
get(String name)
Lookup PrimitiveType by String name and return Enum.
|
static boolean |
isUnsigned(PrimitiveType type)
Is the type an unsigned type like in C.
|
PrimitiveValue |
maxValue()
The maxValue of the primitive type.
|
PrimitiveValue |
minValue()
The minValue of the primitive type.
|
PrimitiveValue |
nullValue()
The nullValue of the primitive type.
|
String |
primitiveName()
The name of the primitive type as a String.
|
int |
size()
The encodedLength of the primitive type in octets.
|
static PrimitiveType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static PrimitiveType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final PrimitiveType CHAR
public static final PrimitiveType INT8
public static final PrimitiveType INT16
public static final PrimitiveType INT32
public static final PrimitiveType INT64
public static final PrimitiveType UINT8
public static final PrimitiveType UINT16
public static final PrimitiveType UINT32
public static final PrimitiveType UINT64
public static final PrimitiveType FLOAT
public static final PrimitiveType DOUBLE
public static PrimitiveType[] values()
for (PrimitiveType c : PrimitiveType.values()) System.out.println(c);
public static PrimitiveType 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 String primitiveName()
public int size()
public PrimitiveValue minValue()
public PrimitiveValue maxValue()
public PrimitiveValue nullValue()
public static boolean isUnsigned(PrimitiveType type)
type
- to be tested.public static PrimitiveType get(String name)
name
- of primitiveType to getPrimitiveType
matching the nameIllegalArgumentException
- if name not foundCopyright © 2013-2022 Real Logic Limited. All Rights Reserved.