# Class VulkanSamplerCreateInfo

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

All Implemented Interfaces:
  `VulkanSamplerCreateInfoType`

public final class VulkanSamplerCreateInfo extends Object implements VulkanSamplerCreateInfoType
Structure specifying how to create a sampler.

See Also:
  - "VkSamplerCreateInfo"

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static final class`
  `VulkanSamplerCreateInfo.Builder`
  Builds instances of type `VulkanSamplerCreateInfo`.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `VulkanSamplerAddressMode`
  `addressModeU()`
  `VulkanSamplerAddressMode`
  `addressModeV()`
  `VulkanSamplerAddressMode`
  `addressModeW()`
  `VulkanBorderColor`
  `borderColor()`
  `static VulkanSamplerCreateInfo.Builder`
  `builder()`
  Creates a builder for `VulkanSamplerCreateInfo`.
  `Optional<VulkanCompareOp>`
  `compareOp()`
  `static VulkanSamplerCreateInfo`
  `copyOf(VulkanSamplerCreateInfoType instance)`
  Creates an immutable copy of a `VulkanSamplerCreateInfoType` value.
  `boolean`
  `equals(Object another)`
  This instance is equal to all instances of `VulkanSamplerCreateInfo` that have equal attribute values.
  `Set<VulkanSamplerCreateFlag>`
  `flags()`
  `int`
  `hashCode()`
  Computes a hash code from attributes: `flags`, `magFilter`, `minFilter`, `mipmapMode`, `addressModeU`, `addressModeV`, `addressModeW`, `mipLodBias`, `maxAnisotropy`, `compareOp`, `minLod`, `maxLod`, `borderColor`, `unnormalizedCoordinates`.
  `VulkanFilter`
  `magFilter()`
  `OptionalDouble`
  `maxAnisotropy()`
  If this value is non-empty, enable anisotropic filtering using the given amount of anisotropy.
  `float`
  `maxLod()`
  `VulkanFilter`
  `minFilter()`
  `float`
  `minLod()`
  `float`
  `mipLodBias()`
  `VulkanSamplerMipmapMode`
  `mipmapMode()`
  `static VulkanSamplerCreateInfo`
  `of(Iterable<VulkanSamplerCreateFlag> flags, VulkanFilter magFilter, VulkanFilter minFilter, VulkanSamplerMipmapMode mipmapMode, VulkanSamplerAddressMode addressModeU, VulkanSamplerAddressMode addressModeV, VulkanSamplerAddressMode addressModeW, float mipLodBias, OptionalDouble maxAnisotropy, Optional<? extends VulkanCompareOp> compareOp, float minLod, float maxLod, VulkanBorderColor borderColor, boolean unnormalizedCoordinates)`
  Construct a new immutable `VulkanSamplerCreateInfo` instance.
  `static VulkanSamplerCreateInfo`
  `of(Set<VulkanSamplerCreateFlag> flags, VulkanFilter magFilter, VulkanFilter minFilter, VulkanSamplerMipmapMode mipmapMode, VulkanSamplerAddressMode addressModeU, VulkanSamplerAddressMode addressModeV, VulkanSamplerAddressMode addressModeW, float mipLodBias, OptionalDouble maxAnisotropy, Optional<VulkanCompareOp> compareOp, float minLod, float maxLod, VulkanBorderColor borderColor, boolean unnormalizedCoordinates)`
  Construct a new immutable `VulkanSamplerCreateInfo` instance.
  `String`
  `toString()`
  Prints the immutable value `VulkanSamplerCreateInfo` with attribute values.
  `boolean`
  `unnormalizedCoordinates()`
  `final VulkanSamplerCreateInfo`
  `withAddressModeU(VulkanSamplerAddressMode value)`
  Copy the current immutable object by setting a value for the `addressModeU` attribute.
  `final VulkanSamplerCreateInfo`
  `withAddressModeV(VulkanSamplerAddressMode value)`
  Copy the current immutable object by setting a value for the `addressModeV` attribute.
  `final VulkanSamplerCreateInfo`
  `withAddressModeW(VulkanSamplerAddressMode value)`
  Copy the current immutable object by setting a value for the `addressModeW` attribute.
  `final VulkanSamplerCreateInfo`
  `withBorderColor(VulkanBorderColor value)`
  Copy the current immutable object by setting a value for the `borderColor` attribute.
  `final VulkanSamplerCreateInfo`
  `withCompareOp(VulkanCompareOp value)`
  Copy the current immutable object by setting a present value for the optional `compareOp` attribute.
  `final VulkanSamplerCreateInfo`
  `withCompareOp(Optional<? extends VulkanCompareOp> optional)`
  Copy the current immutable object by setting an optional value for the `compareOp` attribute.
  `final VulkanSamplerCreateInfo`
  `withFlags(VulkanSamplerCreateFlag... elements)`
  Copy the current immutable object with elements that replace the content of `flags`.
  `final VulkanSamplerCreateInfo`
  `withFlags(Iterable<VulkanSamplerCreateFlag> elements)`
  Copy the current immutable object with elements that replace the content of `flags`.
  `final VulkanSamplerCreateInfo`
  `withMagFilter(VulkanFilter value)`
  Copy the current immutable object by setting a value for the `magFilter` attribute.
  `final VulkanSamplerCreateInfo`
  `withMaxAnisotropy(double value)`
  Copy the current immutable object by setting a present value for the optional `maxAnisotropy` attribute.
  `final VulkanSamplerCreateInfo`
  `withMaxAnisotropy(OptionalDouble optional)`
  Copy the current immutable object by setting an optional value for the `maxAnisotropy` attribute.
  `final VulkanSamplerCreateInfo`
  `withMaxLod(float value)`
  Copy the current immutable object by setting a value for the `maxLod` attribute.
  `final VulkanSamplerCreateInfo`
  `withMinFilter(VulkanFilter value)`
  Copy the current immutable object by setting a value for the `minFilter` attribute.
  `final VulkanSamplerCreateInfo`
  `withMinLod(float value)`
  Copy the current immutable object by setting a value for the `minLod` attribute.
  `final VulkanSamplerCreateInfo`
  `withMipLodBias(float value)`
  Copy the current immutable object by setting a value for the `mipLodBias` attribute.
  `final VulkanSamplerCreateInfo`
  `withMipmapMode(VulkanSamplerMipmapMode value)`
  Copy the current immutable object by setting a value for the `mipmapMode` attribute.
  `final VulkanSamplerCreateInfo`
  `withUnnormalizedCoordinates(boolean value)`
  Copy the current immutable object by setting a value for the `unnormalizedCoordinates` attribute.

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

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Method Details

  - ### flags

    public Set<VulkanSamplerCreateFlag> flags()
    Specified by:
      `flags` in interface `VulkanSamplerCreateInfoType`
    Returns:
      A set of flags describing additional parameters of the sampler.

  - ### magFilter

    public VulkanFilter magFilter()
    Specified by:
      `magFilter` in interface `VulkanSamplerCreateInfoType`
    Returns:
      The magnification filter to apply to lookups.

  - ### minFilter

    public VulkanFilter minFilter()
    Specified by:
      `minFilter` in interface `VulkanSamplerCreateInfoType`
    Returns:
      The minification filter to apply to lookups.

  - ### mipmapMode

    public VulkanSamplerMipmapMode mipmapMode()
    Specified by:
      `mipmapMode` in interface `VulkanSamplerCreateInfoType`
    Returns:
      The mipmap filter to apply to lookups.

  - ### addressModeU

    public VulkanSamplerAddressMode addressModeU()
    Specified by:
      `addressModeU` in interface `VulkanSamplerCreateInfoType`
    Returns:
      The addressing mode for outside [0..1] range for U coordinates.

  - ### addressModeV

    public VulkanSamplerAddressMode addressModeV()
    Specified by:
      `addressModeV` in interface `VulkanSamplerCreateInfoType`
    Returns:
      The addressing mode for outside [0..1] range for V coordinates.

  - ### addressModeW

    public VulkanSamplerAddressMode addressModeW()
    Specified by:
      `addressModeW` in interface `VulkanSamplerCreateInfoType`
    Returns:
      The addressing mode for outside [0..1] range for W coordinates.

  - ### mipLodBias

    public float mipLodBias()
    Specified by:
      `mipLodBias` in interface `VulkanSamplerCreateInfoType`
    Returns:
      The bias to be added to mipmap LOD (level-of-detail) calculation and bias provided by the image sampling functions in SPIR-V.

  - ### maxAnisotropy

    public OptionalDouble maxAnisotropy()
    If this value is non-empty, enable anisotropic filtering using the given amount of anisotropy.
    Specified by:
      `maxAnisotropy` in interface `VulkanSamplerCreateInfoType`
    Returns:
      The anisotropy value clamp used by the sampler

  - ### compareOp

    public Optional<VulkanCompareOp> compareOp()
    Specified by:
      `compareOp` in interface `VulkanSamplerCreateInfoType`
    Returns:
      A value specifying the comparison function to apply to fetched data before filtering

  - ### minLod

    public float minLod()
    Specified by:
      `minLod` in interface `VulkanSamplerCreateInfoType`
    Returns:
      The minimum LOD clamp value

  - ### maxLod

    public float maxLod()
    Specified by:
      `maxLod` in interface `VulkanSamplerCreateInfoType`
    Returns:
      The maximum LOD clamp value

  - ### borderColor

    public VulkanBorderColor borderColor()
    Specified by:
      `borderColor` in interface `VulkanSamplerCreateInfoType`
    Returns:
      The predefined border color to use.

  - ### unnormalizedCoordinates

    public boolean unnormalizedCoordinates()
    Specified by:
      `unnormalizedCoordinates` in interface `VulkanSamplerCreateInfoType`
    Returns:
      `true` if the sampler coordinates should unnormalized

  - ### withFlags

    public final VulkanSamplerCreateInfo withFlags(VulkanSamplerCreateFlag... elements)
    Copy the current immutable object with elements that replace the content of `flags`.
    Parameters:
      `elements` - The elements to set
    Returns:
      A modified copy of `this` object

  - ### withFlags

    public final VulkanSamplerCreateInfo withFlags(Iterable<VulkanSamplerCreateFlag> elements)
    Copy the current immutable object with elements that replace the content of `flags`. A shallow reference equality check is used to prevent copying of the same value by returning `this`.
    Parameters:
      `elements` - An iterable of flags elements to set
    Returns:
      A modified copy of `this` object

  - ### withMagFilter

    public final VulkanSamplerCreateInfo withMagFilter(VulkanFilter value)
    Copy the current immutable object by setting a value for the `magFilter` attribute. A value equality check is used to prevent copying of the same value by returning `this`.
    Parameters:
      `value` - A new value for magFilter
    Returns:
      A modified copy of the `this` object

  - ### withMinFilter

    public final VulkanSamplerCreateInfo withMinFilter(VulkanFilter value)
    Copy the current immutable object by setting a value for the `minFilter` attribute. A value equality check is used to prevent copying of the same value by returning `this`.
    Parameters:
      `value` - A new value for minFilter
    Returns:
      A modified copy of the `this` object

  - ### withMipmapMode

    public final VulkanSamplerCreateInfo withMipmapMode(VulkanSamplerMipmapMode value)
    Copy the current immutable object by setting a value for the `mipmapMode` attribute. A value equality check is used to prevent copying of the same value by returning `this`.
    Parameters:
      `value` - A new value for mipmapMode
    Returns:
      A modified copy of the `this` object

  - ### withAddressModeU

    public final VulkanSamplerCreateInfo withAddressModeU(VulkanSamplerAddressMode value)
    Copy the current immutable object by setting a value for the `addressModeU` attribute. A value equality check is used to prevent copying of the same value by returning `this`.
    Parameters:
      `value` - A new value for addressModeU
    Returns:
      A modified copy of the `this` object

  - ### withAddressModeV

    public final VulkanSamplerCreateInfo withAddressModeV(VulkanSamplerAddressMode value)
    Copy the current immutable object by setting a value for the `addressModeV` attribute. A value equality check is used to prevent copying of the same value by returning `this`.
    Parameters:
      `value` - A new value for addressModeV
    Returns:
      A modified copy of the `this` object

  - ### withAddressModeW

    public final VulkanSamplerCreateInfo withAddressModeW(VulkanSamplerAddressMode value)
    Copy the current immutable object by setting a value for the `addressModeW` attribute. A value equality check is used to prevent copying of the same value by returning `this`.
    Parameters:
      `value` - A new value for addressModeW
    Returns:
      A modified copy of the `this` object

  - ### withMipLodBias

    public final VulkanSamplerCreateInfo withMipLodBias(float value)
    Copy the current immutable object by setting a value for the `mipLodBias` attribute. A value strict bits equality used to prevent copying of the same value by returning `this`.
    Parameters:
      `value` - A new value for mipLodBias
    Returns:
      A modified copy of the `this` object

  - ### withMaxAnisotropy

    public final VulkanSamplerCreateInfo withMaxAnisotropy(double value)
    Copy the current immutable object by setting a present value for the optional `maxAnisotropy` attribute.
    Parameters:
      `value` - The value for maxAnisotropy
    Returns:
      A modified copy of `this` object

  - ### withMaxAnisotropy

    public final VulkanSamplerCreateInfo withMaxAnisotropy(OptionalDouble optional)
    Copy the current immutable object by setting an optional value for the `maxAnisotropy` attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning `this`.
    Parameters:
      `optional` - A value for maxAnisotropy
    Returns:
      A modified copy of `this` object

  - ### withCompareOp

    public final VulkanSamplerCreateInfo withCompareOp(VulkanCompareOp value)
    Copy the current immutable object by setting a present value for the optional `compareOp` attribute.
    Parameters:
      `value` - The value for compareOp
    Returns:
      A modified copy of `this` object

  - ### withCompareOp

    public final VulkanSamplerCreateInfo withCompareOp(Optional<? extends VulkanCompareOp> optional)
    Copy the current immutable object by setting an optional value for the `compareOp` attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning `this`.
    Parameters:
      `optional` - A value for compareOp
    Returns:
      A modified copy of `this` object

  - ### withMinLod

    public final VulkanSamplerCreateInfo withMinLod(float value)
    Copy the current immutable object by setting a value for the `minLod` attribute. A value strict bits equality used to prevent copying of the same value by returning `this`.
    Parameters:
      `value` - A new value for minLod
    Returns:
      A modified copy of the `this` object

  - ### withMaxLod

    public final VulkanSamplerCreateInfo withMaxLod(float value)
    Copy the current immutable object by setting a value for the `maxLod` attribute. A value strict bits equality used to prevent copying of the same value by returning `this`.
    Parameters:
      `value` - A new value for maxLod
    Returns:
      A modified copy of the `this` object

  - ### withBorderColor

    public final VulkanSamplerCreateInfo withBorderColor(VulkanBorderColor value)
    Copy the current immutable object by setting a value for the `borderColor` attribute. A value equality check is used to prevent copying of the same value by returning `this`.
    Parameters:
      `value` - A new value for borderColor
    Returns:
      A modified copy of the `this` object

  - ### withUnnormalizedCoordinates

    public final VulkanSamplerCreateInfo withUnnormalizedCoordinates(boolean value)
    Copy the current immutable object by setting a value for the `unnormalizedCoordinates` attribute. A value equality check is used to prevent copying of the same value by returning `this`.
    Parameters:
      `value` - A new value for unnormalizedCoordinates
    Returns:
      A modified copy of the `this` object

  - ### equals

    public boolean equals(Object another)
    This instance is equal to all instances of `VulkanSamplerCreateInfo` that have equal attribute values.
    Overrides:
      `equals` in class `Object`
    Returns:
      `true` if `this` is equal to `another` instance

  - ### hashCode

    public int hashCode()
    Computes a hash code from attributes: `flags`, `magFilter`, `minFilter`, `mipmapMode`, `addressModeU`, `addressModeV`, `addressModeW`, `mipLodBias`, `maxAnisotropy`, `compareOp`, `minLod`, `maxLod`, `borderColor`, `unnormalizedCoordinates`.
    Overrides:
      `hashCode` in class `Object`
    Returns:
      hashCode value

  - ### toString

    public String toString()
    Prints the immutable value `VulkanSamplerCreateInfo` with attribute values.
    Overrides:
      `toString` in class `Object`
    Returns:
      A string representation of the value

  - ### of

    public static VulkanSamplerCreateInfo of(Set<VulkanSamplerCreateFlag> flags, VulkanFilter magFilter, VulkanFilter minFilter, VulkanSamplerMipmapMode mipmapMode, VulkanSamplerAddressMode addressModeU, VulkanSamplerAddressMode addressModeV, VulkanSamplerAddressMode addressModeW, float mipLodBias, OptionalDouble maxAnisotropy, Optional<VulkanCompareOp> compareOp, float minLod, float maxLod, VulkanBorderColor borderColor, boolean unnormalizedCoordinates)
    Construct a new immutable `VulkanSamplerCreateInfo` instance.
    Parameters:
      `flags` - The value for the `flags` attribute
      `magFilter` - The value for the `magFilter` attribute
      `minFilter` - The value for the `minFilter` attribute
      `mipmapMode` - The value for the `mipmapMode` attribute
      `addressModeU` - The value for the `addressModeU` attribute
      `addressModeV` - The value for the `addressModeV` attribute
      `addressModeW` - The value for the `addressModeW` attribute
      `mipLodBias` - The value for the `mipLodBias` attribute
      `maxAnisotropy` - The value for the `maxAnisotropy` attribute
      `compareOp` - The value for the `compareOp` attribute
      `minLod` - The value for the `minLod` attribute
      `maxLod` - The value for the `maxLod` attribute
      `borderColor` - The value for the `borderColor` attribute
      `unnormalizedCoordinates` - The value for the `unnormalizedCoordinates` attribute
    Returns:
      An immutable VulkanSamplerCreateInfo instance

  - ### of

    public static VulkanSamplerCreateInfo of(Iterable<VulkanSamplerCreateFlag> flags, VulkanFilter magFilter, VulkanFilter minFilter, VulkanSamplerMipmapMode mipmapMode, VulkanSamplerAddressMode addressModeU, VulkanSamplerAddressMode addressModeV, VulkanSamplerAddressMode addressModeW, float mipLodBias, OptionalDouble maxAnisotropy, Optional<? extends VulkanCompareOp> compareOp, float minLod, float maxLod, VulkanBorderColor borderColor, boolean unnormalizedCoordinates)
    Construct a new immutable `VulkanSamplerCreateInfo` instance.
    Parameters:
      `flags` - The value for the `flags` attribute
      `magFilter` - The value for the `magFilter` attribute
      `minFilter` - The value for the `minFilter` attribute
      `mipmapMode` - The value for the `mipmapMode` attribute
      `addressModeU` - The value for the `addressModeU` attribute
      `addressModeV` - The value for the `addressModeV` attribute
      `addressModeW` - The value for the `addressModeW` attribute
      `mipLodBias` - The value for the `mipLodBias` attribute
      `maxAnisotropy` - The value for the `maxAnisotropy` attribute
      `compareOp` - The value for the `compareOp` attribute
      `minLod` - The value for the `minLod` attribute
      `maxLod` - The value for the `maxLod` attribute
      `borderColor` - The value for the `borderColor` attribute
      `unnormalizedCoordinates` - The value for the `unnormalizedCoordinates` attribute
    Returns:
      An immutable VulkanSamplerCreateInfo instance

  - ### copyOf

    public static VulkanSamplerCreateInfo copyOf(VulkanSamplerCreateInfoType instance)
    Creates an immutable copy of a `VulkanSamplerCreateInfoType` value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.
    Parameters:
      `instance` - The instance to copy
    Returns:
      A copied immutable VulkanSamplerCreateInfo instance

  - ### builder

    public static VulkanSamplerCreateInfo.Builder builder()
    Creates a builder for `VulkanSamplerCreateInfo`.

         VulkanSamplerCreateInfo.builder()
            .addFlags|addAllFlags(com.io7m.jcoronado.api.VulkanSamplerCreateFlag) // flags elements
            .setMagFilter(com.io7m.jcoronado.api.VulkanFilter) // required magFilter
            .setMinFilter(com.io7m.jcoronado.api.VulkanFilter) // required minFilter
            .setMipmapMode(com.io7m.jcoronado.api.VulkanSamplerMipmapMode) // required mipmapMode
            .setAddressModeU(com.io7m.jcoronado.api.VulkanSamplerAddressMode) // required addressModeU
            .setAddressModeV(com.io7m.jcoronado.api.VulkanSamplerAddressMode) // required addressModeV
            .setAddressModeW(com.io7m.jcoronado.api.VulkanSamplerAddressMode) // required addressModeW
            .setMipLodBias(float) // required mipLodBias
            .setMaxAnisotropy(double) // optional maxAnisotropy
            .setCompareOp(com.io7m.jcoronado.api.VulkanCompareOp) // optional compareOp
            .setMinLod(float) // required minLod
            .setMaxLod(float) // required maxLod
            .setBorderColor(com.io7m.jcoronado.api.VulkanBorderColor) // required borderColor
            .setUnnormalizedCoordinates(boolean) // required unnormalizedCoordinates
            .build();

    Returns:
      A new VulkanSamplerCreateInfo builder