de.caff.util

## Class Enums

- java.lang.Object
- - de.caff.util.Enums

- Deprecated.
  move to `Enums` in module generics

      @Deprecated
      public class Enums
      extends java.lang.Object

  Toolbox for enums.
  Author:
    Rammi

- - ### Method Summary

    All Methods Static Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `static <E> E` | `getEnumFromOrdinal(E[] values, int ordinal)` Deprecated. Get an enum value from its ordinal.
    `static <E> E` | `getEnumFromOrdinal(E[] values, int ordinal, E defaultValue)` Deprecated. Get an enum value from its ordinal.
    `static <E> E` | `getEnumFromOrdinal(Indexable<E> values, int ordinal)` Deprecated. Get an enum value from its ordinal.
    `static <E> E` | `getEnumFromOrdinal(Indexable<E> values, int ordinal, E defaultValue)` Deprecated. Get an enum value from its ordinal.

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

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### getEnumFromOrdinal

          @Nullable
          public static <E> E getEnumFromOrdinal(@NotNull
                                                           E[] values,
                                                           int ordinal)

      Deprecated.
      Get an enum value from its ordinal.
      Type Parameters:
        `E` - type of returned value, usually an enum but this is not enforced
      Parameters:
        `values` - enum values with ordinal indices
        `ordinal` - enum ordinal
      Returns:
        associated value or `null` if there is no matching value

    - #### getEnumFromOrdinal

          @Nullable
          public static <E> E getEnumFromOrdinal(@NotNull
                                                           Indexable<E> values,
                                                           int ordinal)

      Deprecated.
      Get an enum value from its ordinal.
      Type Parameters:
        `E` - type of returned value, usually an enum but this is not enforced
      Parameters:
        `values` - enum values with ordinal indices
        `ordinal` - enum ordinal
      Returns:
        associated value or `null` if there is no matching value

    - #### getEnumFromOrdinal

          @NotNull
          public static <E> E getEnumFromOrdinal(@NotNull
                                                          E[] values,
                                                          int ordinal,
                                                          @NotNull
                                                          E defaultValue)

      Deprecated.
      Get an enum value from its ordinal.
      Type Parameters:
        `E` - type of returned value, usually an enum but this is not enforced
      Parameters:
        `values` - enum values with ordinal indices
        `ordinal` - enum ordinal
        `defaultValue` - default value returned if ordinal is out of range
      Returns:
        associated value or `defaultValue` if there is no matching value

    - #### getEnumFromOrdinal

          @NotNull
          public static <E> E getEnumFromOrdinal(@NotNull
                                                          Indexable<E> values,
                                                          int ordinal,
                                                          @NotNull
                                                          E defaultValue)

      Deprecated.
      Get an enum value from its ordinal.
      Type Parameters:
        `E` - type of returned value, usually an enum but this is not enforced
      Parameters:
        `values` - enum values with ordinal indices
        `ordinal` - enum ordinal
        `defaultValue` - default value returned if ordinal is out of range
      Returns:
        associated value or `defaultValue` if there is no matching value