com.io7m.r2.core.shaders.types

## Class R2ShaderParametersMaterial<M>

- java.lang.Object
- - com.io7m.r2.core.shaders.types.R2ShaderParametersMaterial<M>

- Type Parameters:
    `M` - The precise type of shader parameters
  All Implemented Interfaces:
    R2ShaderParametersMaterialType<M>

      @Generated(value={"Immutables.generator","R2ShaderParametersMaterialType<M>"})
      public final class R2ShaderParametersMaterial<M>
      extends Object
      implements R2ShaderParametersMaterialType<M>

  The type of material-related parameters available to shaders.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `R2ShaderParametersMaterial.Builder<M>` Builds instances of type `R2ShaderParametersMaterial`.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static <M> R2ShaderParametersMaterial.Builder<M>` | `builder()` Creates a builder for `R2ShaderParametersMaterial`.
    `static <M> R2ShaderParametersMaterial<M>` | `copyOf(R2ShaderParametersMaterialType<M> instance)` Creates an immutable copy of a `R2ShaderParametersMaterialType` value.
    `boolean` | `equals(Object another)` This instance is equal to all instances of `R2ShaderParametersMaterial` that have equal attribute values.
    `int` | `hashCode()` Computes a hash code from attributes: `textureUnitContext`, `values`.
    `static <M> R2ShaderParametersMaterial<M>` | `of(com.io7m.jcanephora.texture_unit_allocator.JCGLTextureUnitContextMutableType textureUnitContext, M values)` Construct a new immutable `R2ShaderParametersMaterial` instance.
    `com.io7m.jcanephora.texture_unit_allocator.JCGLTextureUnitContextMutableType` | `textureUnitContext()`
    `String` | `toString()` Prints the immutable value `R2ShaderParametersMaterial` with attribute values.
    `M` | `values()`
    `R2ShaderParametersMaterial<M>` | `withTextureUnitContext(com.io7m.jcanephora.texture_unit_allocator.JCGLTextureUnitContextMutableType value)` Copy the current immutable object by setting a value for the `textureUnitContext` attribute.
    `R2ShaderParametersMaterial<M>` | `withValues(M value)` Copy the current immutable object by setting a value for the `values` attribute.

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

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

- - ### Method Detail

    - #### textureUnitContext

          public com.io7m.jcanephora.texture_unit_allocator.JCGLTextureUnitContextMutableType textureUnitContext()

      Specified by:
        `textureUnitContext` in interface `R2ShaderParametersMaterialType<M>`
      Returns:
        The current texture unit context

    - #### values

          public M values()

      Specified by:
        `values` in interface `R2ShaderParametersMaterialType<M>`
      Returns:
        The current shader values

    - #### withTextureUnitContext

          public final R2ShaderParametersMaterial<M> withTextureUnitContext(com.io7m.jcanephora.texture_unit_allocator.JCGLTextureUnitContextMutableType value)

      Copy the current immutable object by setting a value for the `textureUnitContext` attribute. A shallow reference equality check is used to prevent copying of the same value by returning `this`.
      Parameters:
        `value` - A new value for textureUnitContext
      Returns:
        A modified copy of the `this` object

    - #### withValues

          public final R2ShaderParametersMaterial<M> withValues(M value)

      Copy the current immutable object by setting a value for the `values` attribute. A shallow reference equality check is used to prevent copying of the same value by returning `this`.
      Parameters:
        `value` - A new value for values
      Returns:
        A modified copy of the `this` object

    - #### equals

          public boolean equals(Object another)

      This instance is equal to all instances of `R2ShaderParametersMaterial` 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: `textureUnitContext`, `values`.
      Overrides:
        `hashCode` in class `Object`
      Returns:
        hashCode value

    - #### toString

          public String toString()

      Prints the immutable value `R2ShaderParametersMaterial` with attribute values.
      Overrides:
        `toString` in class `Object`
      Returns:
        A string representation of the value

    - #### of

          public static <M> R2ShaderParametersMaterial<M> of(com.io7m.jcanephora.texture_unit_allocator.JCGLTextureUnitContextMutableType textureUnitContext,
                                                             M values)

      Construct a new immutable `R2ShaderParametersMaterial` instance.
      Parameters:
        `textureUnitContext` - The value for the `textureUnitContext` attribute
        `values` - The value for the `values` attribute
      Returns:
        An immutable R2ShaderParametersMaterial instance

    - #### copyOf

          public static <M> R2ShaderParametersMaterial<M> copyOf(R2ShaderParametersMaterialType<M> instance)

      Creates an immutable copy of a `R2ShaderParametersMaterialType` value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.
      Type Parameters:
        `M` - generic parameter M
      Parameters:
        `instance` - The instance to copy
      Returns:
        A copied immutable R2ShaderParametersMaterial instance

    - #### builder

          public static <M> R2ShaderParametersMaterial.Builder<M> builder()

      Creates a builder for `R2ShaderParametersMaterial`.
      Type Parameters:
        `M` - generic parameter M
      Returns:
        A new R2ShaderParametersMaterial builder

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