# Class VulkanLWJGLOptionals

java.lang.Object
com.io7m.jcoronado.lwjgl.internal.VulkanLWJGLOptionals

public final class VulkanLWJGLOptionals extends Object
Functions to pack optionals.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static interface`
  `VulkanLWJGLOptionals.PackingFunctionType<A, T extends org.lwjgl.system.Struct<T>>`
  The type of functions that can pack values of type `A` into structures of type `T`.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static <A, T extends org.lwjgl.system.Struct<T>>
  T`
  `pack(Optional<A> value, VulkanLWJGLOptionals.PackingFunctionType<A,T> packer, Function<org.lwjgl.system.MemoryStack, T> allocator, org.lwjgl.system.MemoryStack stack)`
  Pack an optional value.

  ### Methods inherited from class Object

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

- ## Method Details

  - ### pack

    public static <A, T extends org.lwjgl.system.Struct<T>> T pack(Optional<A> value, VulkanLWJGLOptionals.PackingFunctionType<A,T> packer, Function<org.lwjgl.system.MemoryStack, T> allocator, org.lwjgl.system.MemoryStack stack) throws VulkanException
    Pack an optional value.
    Type Parameters:
      `A` - The type of input values
      `T` - The type of output structs
    Parameters:
      `value` - The optional value
      `packer` - A value packer
      `allocator` - The allocator function
      `stack` - The stack for allocations
    Returns:
      An array of packed structs
    Throws:
      `VulkanException` - On errors