# Class VulkanEnumMaps

java.lang.Object
com.io7m.jcoronado.api.VulkanEnumMaps

public final class VulkanEnumMaps extends Object
Functions over enum ←→ integer maps.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static <T extends Enum<T> & VulkanEnumIntegerType>
  Map<Integer,T>`
  `map(T[] values)`
  Produce an efficient map of integers to enum constants.
  `static <T extends Enum<T> & VulkanEnumBitmaskType>
  int`
  `packValues(Iterable<T> values)`
  Bitwise OR the integer values of all the given constants.
  `static <T extends Enum<T> & VulkanEnumBitmaskLongType>
  long`
  `packValuesLong(Iterable<T> values)`
  Bitwise OR the integer values of all the given constants.
  `static <T extends Enum<T> & VulkanEnumBitmaskType>
  EnumSet<T>`
  `unpackValues(Class<T> enumClass, Supplier<T[]> enumValues, int flags)`
  Unpack flag values from a given integer.

  ### Methods inherited from class Object

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

- ## Method Details

  - ### packValuesLong

    public static <T extends Enum<T> & VulkanEnumBitmaskLongType> long packValuesLong(Iterable<T> values)
    Bitwise OR the integer values of all the given constants.
    Type Parameters:
      `T` - The precise type of enum
    Parameters:
      `values` - The values
    Returns:
      The integer-packed values

  - ### packValues

    public static <T extends Enum<T> & VulkanEnumBitmaskType> int packValues(Iterable<T> values)
    Bitwise OR the integer values of all the given constants.
    Type Parameters:
      `T` - The precise type of enum
    Parameters:
      `values` - The values
    Returns:
      The integer-packed values

  - ### unpackValues

    public static <T extends Enum<T> & VulkanEnumBitmaskType> EnumSet<T> unpackValues(Class<T> enumClass, Supplier<T[]> enumValues, int flags)
    Unpack flag values from a given integer.
    Type Parameters:
      `T` - The precise type of enum
    Parameters:
      `enumClass` - The enum class
      `enumValues` - A function that returns the result of the enum's values() method.
      `flags` - The flags value
    Returns:
      The integer-packed values

  - ### map

    public static <T extends Enum<T> & VulkanEnumIntegerType> Map<Integer,T> map(T[] values)
    Produce an efficient map of integers to enum constants.
    Type Parameters:
      `T` - The precise type of enum
    Parameters:
      `values` - The list of enum values
    Returns:
      The resulting map