Package uk.co.real_logic.sbe
Enum Class PrimitiveType
- All Implemented Interfaces:
Serializable,Comparable<PrimitiveType>,Constable
Primitive types from which all other types are composed.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionOne byte character type which is a flavour of ASCII.A 64-bit double precision floating point number.A 32-bit single precision floating point number.A 16-bit signed integer.A 32-bit signed integer.A 64-bit signed integer.A raw byte or signed 8-bit integer.A 16-bit unsigned integer.A 32-bit unsigned integer.A 64-bit unsigned integer.A 8-bit unsigned integer. -
Method Summary
Modifier and TypeMethodDescriptionstatic PrimitiveTypeLookup PrimitiveType by String name and return Enum.static booleanisUnsigned(PrimitiveType type) Is the type an unsigned type like in C.maxValue()The maxValue of the primitive type.minValue()The minValue of the primitive type.The nullValue of the primitive type.The name of the primitive type as a String.intsize()The encodedLength of the primitive type in octets.static PrimitiveTypeReturns the enum constant of this class with the specified name.static PrimitiveType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
CHAR
One byte character type which is a flavour of ASCII. -
INT8
A raw byte or signed 8-bit integer. -
INT16
A 16-bit signed integer. -
INT32
A 32-bit signed integer. -
INT64
A 64-bit signed integer. -
UINT8
A 8-bit unsigned integer. -
UINT16
A 16-bit unsigned integer. -
UINT32
A 32-bit unsigned integer. -
UINT64
A 64-bit unsigned integer. -
FLOAT
A 32-bit single precision floating point number. -
DOUBLE
A 64-bit double precision floating point number.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
primitiveName
The name of the primitive type as a String.- Returns:
- the name as a String
-
size
public int size()The encodedLength of the primitive type in octets.- Returns:
- encodedLength (in octets) of the primitive type
-
minValue
The minValue of the primitive type.- Returns:
- default minValue of the primitive type
-
maxValue
The maxValue of the primitive type.- Returns:
- default maxValue of the primitive type
-
nullValue
The nullValue of the primitive type.- Returns:
- default nullValue of the primitive type
-
isUnsigned
Is the type an unsigned type like in C.- Parameters:
type- to be tested.- Returns:
- true if unsigned otherwise false.
-
get
Lookup PrimitiveType by String name and return Enum.- Parameters:
name- of primitiveType to get- Returns:
- the
PrimitiveTypematching the name - Throws:
IllegalArgumentException- if name not found
-