com.io7m.jcanephora.core

## Enum JCGLScalarIntegralType

- java.lang.Object
- - java.lang.Enum<JCGLScalarIntegralType>
  - - com.io7m.jcanephora.core.JCGLScalarIntegralType

- All Implemented Interfaces:
    Serializable, Comparable<JCGLScalarIntegralType>

      public enum JCGLScalarIntegralType
      extends Enum<JCGLScalarIntegralType>

  Type-safe interface to integral scalar types.

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant and Description
    `TYPE_BYTE` A signed 8-bit integer.
    `TYPE_INT` A signed 32-bit integer.
    `TYPE_SHORT` A signed 16-bit integer.
    `TYPE_UNSIGNED_BYTE` An unsigned 8-bit integer.
    `TYPE_UNSIGNED_INT` An unsigned 32-bit integer.
    `TYPE_UNSIGNED_SHORT` An unsigned 16-bit integer.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static JCGLScalarIntegralType` | `fromScalar(JCGLScalarType s)` Convert the given type to a scalar integral type.
    `static JCGLScalarIntegralType` | `fromScalarUnsigned(JCGLUnsignedType s)` Convert the given type to a scalar integral type.
    `int` | `getSizeBytes()`
    `static JCGLScalarIntegralType` | `valueOf(String name)` Returns the enum constant of this type with the specified name.
    `static JCGLScalarIntegralType[]` | `values()` Returns an array containing the constants of this enum type, in the order they are declared.

    - ### Methods inherited from class java.lang.Enum

      `clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

    - ### Methods inherited from class java.lang.Object

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Enum Constant Detail

    - #### TYPE_BYTE

          public static final JCGLScalarIntegralType TYPE_BYTE

      A signed 8-bit integer.

    - #### TYPE_INT

          public static final JCGLScalarIntegralType TYPE_INT

      A signed 32-bit integer.

    - #### TYPE_SHORT

          public static final JCGLScalarIntegralType TYPE_SHORT

      A signed 16-bit integer.

    - #### TYPE_UNSIGNED_BYTE

          public static final JCGLScalarIntegralType TYPE_UNSIGNED_BYTE

      An unsigned 8-bit integer.

    - #### TYPE_UNSIGNED_INT

          public static final JCGLScalarIntegralType TYPE_UNSIGNED_INT

      An unsigned 32-bit integer.

    - #### TYPE_UNSIGNED_SHORT

          public static final JCGLScalarIntegralType TYPE_UNSIGNED_SHORT

      An unsigned 16-bit integer.

  - ### Method Detail

    - #### values

          public static JCGLScalarIntegralType[] values()

      Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:

          for (JCGLScalarIntegralType c : JCGLScalarIntegralType.values())
              System.out.println(c);

      Returns:
        an array containing the constants of this enum type, in the order they are declared

    - #### valueOf

          public static JCGLScalarIntegralType valueOf(String name)

      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name
        `NullPointerException` - if the argument is null

    - #### fromScalar

          public static JCGLScalarIntegralType fromScalar(JCGLScalarType s)
                                                   throws IllegalArgumentException

      Convert the given type to a scalar integral type.
      Parameters:
        `s` - The scalar type
      Returns:
        An integral type
      Throws:
        `IllegalArgumentException` - Iff the given type is not integral
      Since:
        0.53.1

    - #### fromScalarUnsigned

          public static JCGLScalarIntegralType fromScalarUnsigned(JCGLUnsignedType s)

      Convert the given type to a scalar integral type.
      Parameters:
        `s` - The unsigned type
      Returns:
        An integral type
      Since:
        0.53.1

    - #### getSizeBytes

          public int getSizeBytes()

      Returns:
        The size in bytes of values of the current type.
      Since:
        0.53.0

Copyright © 2017 <code@io7m.com> http://io7m.com