com.io7m.r2.core

## Class R2MaterialOpaqueSingle<M>

- java.lang.Object
- - com.io7m.r2.core.R2MaterialOpaqueSingle<M>

- Type Parameters:
    `M` - The type of shader parameters
  All Implemented Interfaces:
    R2MaterialOpaqueSingleType<M>, R2MaterialType<M>

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

  The type of opaque materials that can be applied to single instances.

- - ### Nested Class Summary

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

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static <M> R2MaterialOpaqueSingle.Builder<M>` | `builder()` Creates a builder for `R2MaterialOpaqueSingle`.
    `static <M> R2MaterialOpaqueSingle<M>` | `copyOf(R2MaterialOpaqueSingleType<M> instance)` Creates an immutable copy of a `R2MaterialOpaqueSingleType` value.
    `boolean` | `equals(Object another)` This instance is equal to all instances of `R2MaterialOpaqueSingle` that have equal attribute values.
    `int` | `hashCode()` Computes a hash code from attributes: `materialID`.
    `long` | `materialID()`
    `static <M> R2MaterialOpaqueSingle<M>` | `of(long materialID, R2ShaderInstanceSingleUsableType<M> shader, M shaderParameters)` Construct a new immutable `R2MaterialOpaqueSingle` instance.
    `R2ShaderInstanceSingleUsableType<M>` | `shader()`
    `M` | `shaderParameters()`
    `String` | `toString()` Prints the immutable value `R2MaterialOpaqueSingle` with attribute values.
    `R2MaterialOpaqueSingle<M>` | `withMaterialID(long value)` Copy the current immutable object by setting a value for the `materialID` attribute.
    `R2MaterialOpaqueSingle<M>` | `withShader(R2ShaderInstanceSingleUsableType<M> value)` Copy the current immutable object by setting a value for the `shader` attribute.
    `R2MaterialOpaqueSingle<M>` | `withShaderParameters(M value)` Copy the current immutable object by setting a value for the `shaderParameters` attribute.

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

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

- - ### Method Detail

    - #### materialID

          public long materialID()

      Specified by:
        `materialID` in interface `R2MaterialOpaqueSingleType<M>`
      Specified by:
        `materialID` in interface `R2MaterialType<M>`
      Returns:
        The value of the `materialID` attribute

    - #### shader

          public R2ShaderInstanceSingleUsableType<M> shader()

      Specified by:
        `shader` in interface `R2MaterialOpaqueSingleType<M>`
      Specified by:
        `shader` in interface `R2MaterialType<M>`
      Returns:
        The material shader

    - #### shaderParameters

          public M shaderParameters()

      Specified by:
        `shaderParameters` in interface `R2MaterialOpaqueSingleType<M>`
      Specified by:
        `shaderParameters` in interface `R2MaterialType<M>`
      Returns:
        The value of the `shaderParameters` attribute

    - #### withMaterialID

          public final R2MaterialOpaqueSingle<M> withMaterialID(long value)

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

    - #### withShader

          public final R2MaterialOpaqueSingle<M> withShader(R2ShaderInstanceSingleUsableType<M> value)

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

    - #### withShaderParameters

          public final R2MaterialOpaqueSingle<M> withShaderParameters(M value)

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

    - #### equals

          public boolean equals(Object another)

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

    - #### toString

          public String toString()

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

    - #### of

          public static <M> R2MaterialOpaqueSingle<M> of(long materialID,
                                                         R2ShaderInstanceSingleUsableType<M> shader,
                                                         M shaderParameters)

      Construct a new immutable `R2MaterialOpaqueSingle` instance.
      Parameters:
        `materialID` - The value for the `materialID` attribute
        `shader` - The value for the `shader` attribute
        `shaderParameters` - The value for the `shaderParameters` attribute
      Returns:
        An immutable R2MaterialOpaqueSingle instance

    - #### copyOf

          public static <M> R2MaterialOpaqueSingle<M> copyOf(R2MaterialOpaqueSingleType<M> instance)

      Creates an immutable copy of a `R2MaterialOpaqueSingleType` 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 R2MaterialOpaqueSingle instance

    - #### builder

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

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

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