com.io7m.r2.core.shaders.types

## Class R2ShaderParametersMaterialMutable<M>

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

- Type Parameters:
    `M` - generic parameter M
  All Implemented Interfaces:
    R2ShaderParametersMaterialType<M>

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

  A modifiable implementation of the `R2ShaderParametersMaterialType` type.

  Use the `create()` static factory methods to create new instances. Use the `toImmutable()` method to convert to canonical immutable instances.

  R2ShaderParametersMaterialMutable is not thread-safe

  See Also:
    `R2ShaderParametersMaterial`

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `R2ShaderParametersMaterialMutable<M>` | `clear()` Clears the object by setting all attributes to their initial values.
    `static <M> R2ShaderParametersMaterialMutable<M>` | `create()` Construct a modifiable instance of `R2ShaderParametersMaterialType`.
    `static <M> R2ShaderParametersMaterialMutable<M>` | `create(com.io7m.jcanephora.texture_unit_allocator.JCGLTextureUnitContextMutableType textureUnitContext, M values)` Construct a modifiable instance of `R2ShaderParametersMaterialType`.
    `boolean` | `equals(Object another)` This instance is equal to all instances of `R2ShaderParametersMaterialMutable` that have equal attribute values.
    `R2ShaderParametersMaterialMutable<M>` | `from(R2ShaderParametersMaterialType<M> instance)` Fill this modifiable instance with attribute values from the provided `R2ShaderParametersMaterialType` instance.
    `int` | `hashCode()` Computes a hash code from attributes: `textureUnitContext`, `values`.
    `boolean` | `isInitialized()` Returns `true` if all required attributes are set, indicating that the object is initialized.
    `R2ShaderParametersMaterialMutable<M>` | `setTextureUnitContext(com.io7m.jcanephora.texture_unit_allocator.JCGLTextureUnitContextMutableType textureUnitContext)` Assigns a value to the `textureUnitContext` attribute.
    `R2ShaderParametersMaterialMutable<M>` | `setValues(M values)` Assigns a value to the `values` attribute.
    `com.io7m.jcanephora.texture_unit_allocator.JCGLTextureUnitContextMutableType` | `textureUnitContext()`
    `boolean` | `textureUnitContextIsSet()` Returns `true` if the required attribute `textureUnitContext` is set.
    `R2ShaderParametersMaterial<M>` | `toImmutable()` Converts to `R2ShaderParametersMaterial`.
    `String` | `toString()` Generates a string representation of this `R2ShaderParametersMaterialType`.
    `R2ShaderParametersMaterialMutable<M>` | `unsetTextureUnitContext()` Reset an attribute to its initial value.
    `R2ShaderParametersMaterialMutable<M>` | `unsetValues()` Reset an attribute to its initial value.
    `M` | `values()`
    `boolean` | `valuesIsSet()` Returns `true` if the required attribute `values` is set.

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

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

- - ### Method Detail

    - #### create

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

      Construct a modifiable instance of `R2ShaderParametersMaterialType`.
      Type Parameters:
        `M` - generic parameter M
      Parameters:
        `textureUnitContext` - The value for the `textureUnitContext` attribute
        `values` - The value for the `values` attribute
      Returns:
        A new modifiable instance

    - #### create

          public static <M> R2ShaderParametersMaterialMutable<M> create()

      Construct a modifiable instance of `R2ShaderParametersMaterialType`.
      Type Parameters:
        `M` - generic parameter M
      Returns:
        A new modifiable instance

    - #### textureUnitContext

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

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

    - #### values

          public final M values()

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

    - #### clear

          public R2ShaderParametersMaterialMutable<M> clear()

      Clears the object by setting all attributes to their initial values.
      Returns:
        `this` for use in a chained invocation

    - #### from

          public R2ShaderParametersMaterialMutable<M> from(R2ShaderParametersMaterialType<M> instance)

      Fill this modifiable instance with attribute values from the provided `R2ShaderParametersMaterialType` instance. Regular attribute values will be overridden, i.e. replaced with ones of an instance. Any of the instance's absent optional values will not be copied (will not override current values).
      Parameters:
        `instance` - The instance from which to copy values
      Returns:
        `this` for use in a chained invocation

    - #### setTextureUnitContext

          public R2ShaderParametersMaterialMutable<M> setTextureUnitContext(com.io7m.jcanephora.texture_unit_allocator.JCGLTextureUnitContextMutableType textureUnitContext)

      Assigns a value to the `textureUnitContext` attribute.
      Parameters:
        `textureUnitContext` - The value for textureUnitContext
      Returns:
        `this` for use in a chained invocation

    - #### setValues

          public R2ShaderParametersMaterialMutable<M> setValues(M values)

      Assigns a value to the `values` attribute.
      Parameters:
        `values` - The value for values
      Returns:
        `this` for use in a chained invocation

    - #### textureUnitContextIsSet

          public final boolean textureUnitContextIsSet()

      Returns `true` if the required attribute `textureUnitContext` is set.
      Returns:
        `true` if set

    - #### valuesIsSet

          public final boolean valuesIsSet()

      Returns `true` if the required attribute `values` is set.
      Returns:
        `true` if set

    - #### unsetTextureUnitContext

          public final R2ShaderParametersMaterialMutable<M> unsetTextureUnitContext()

      Reset an attribute to its initial value.
      Returns:
        `this` for use in a chained invocation

    - #### unsetValues

          public final R2ShaderParametersMaterialMutable<M> unsetValues()

      Reset an attribute to its initial value.
      Returns:
        `this` for use in a chained invocation

    - #### isInitialized

          public final boolean isInitialized()

      Returns `true` if all required attributes are set, indicating that the object is initialized.
      Returns:
        `true` if set

    - #### toImmutable

          public final R2ShaderParametersMaterial<M> toImmutable()

      Converts to `R2ShaderParametersMaterial`.
      Returns:
        An immutable instance of R2ShaderParametersMaterial

    - #### equals

          public boolean equals(Object another)

      This instance is equal to all instances of `R2ShaderParametersMaterialMutable` that have equal attribute values. An uninitialized instance is equal only to itself.
      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()

      Generates a string representation of this `R2ShaderParametersMaterialType`. If uninitialized, some attribute values may appear as question marks.
      Overrides:
        `toString` in class `Object`
      Returns:
        A string representation

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