Enum Class PrimitiveType

java.lang.Object
java.lang.Enum<PrimitiveType>
uk.co.real_logic.sbe.PrimitiveType
All Implemented Interfaces:
Serializable, Comparable<PrimitiveType>, Constable

public enum PrimitiveType extends Enum<PrimitiveType>
Primitive types from which all other types are composed.
  • Enum Constant Details

    • CHAR

      public static final PrimitiveType CHAR
      One byte character type which is a flavour of ASCII.
    • INT8

      public static final PrimitiveType INT8
      A raw byte or signed 8-bit integer.
    • INT16

      public static final PrimitiveType INT16
      A 16-bit signed integer.
    • INT32

      public static final PrimitiveType INT32
      A 32-bit signed integer.
    • INT64

      public static final PrimitiveType INT64
      A 64-bit signed integer.
    • UINT8

      public static final PrimitiveType UINT8
      A 8-bit unsigned integer.
    • UINT16

      public static final PrimitiveType UINT16
      A 16-bit unsigned integer.
    • UINT32

      public static final PrimitiveType UINT32
      A 32-bit unsigned integer.
    • UINT64

      public static final PrimitiveType UINT64
      A 64-bit unsigned integer.
    • FLOAT

      public static final PrimitiveType FLOAT
      A 32-bit single precision floating point number.
    • DOUBLE

      public static final PrimitiveType DOUBLE
      A 64-bit double precision floating point number.
  • Method Details

    • values

      public static PrimitiveType[] 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

      public static PrimitiveType valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • primitiveName

      public String 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

      public PrimitiveValue minValue()
      The minValue of the primitive type.
      Returns:
      default minValue of the primitive type
    • maxValue

      public PrimitiveValue maxValue()
      The maxValue of the primitive type.
      Returns:
      default maxValue of the primitive type
    • nullValue

      public PrimitiveValue nullValue()
      The nullValue of the primitive type.
      Returns:
      default nullValue of the primitive type
    • isUnsigned

      public static boolean isUnsigned(PrimitiveType type)
      Is the type an unsigned type like in C.
      Parameters:
      type - to be tested.
      Returns:
      true if unsigned otherwise false.
    • get

      public static PrimitiveType get(String name)
      Lookup PrimitiveType by String name and return Enum.
      Parameters:
      name - of primitiveType to get
      Returns:
      the PrimitiveType matching the name
      Throws:
      IllegalArgumentException - if name not found