com.io7m.r2.core

## Class R2MaterialDepthSingle<M>

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

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

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

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

- - ### Nested Class Summary

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

  - ### Method Summary

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

    - #### shader

          public R2ShaderDepthSingleUsableType<M> shader()

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

    - #### shaderParameters

          public M shaderParameters()

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

    - #### withMaterialID

          public final R2MaterialDepthSingle<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 R2MaterialDepthSingle<M> withShader(R2ShaderDepthSingleUsableType<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 R2MaterialDepthSingle<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 `R2MaterialDepthSingle` 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 `R2MaterialDepthSingle` with attribute values.
      Overrides:
        `toString` in class `Object`
      Returns:
        A string representation of the value

    - #### of

          public static <M> R2MaterialDepthSingle<M> of(long materialID,
                                                        R2ShaderDepthSingleUsableType<M> shader,
                                                        M shaderParameters)

      Construct a new immutable `R2MaterialDepthSingle` 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 R2MaterialDepthSingle instance

    - #### copyOf

          public static <M> R2MaterialDepthSingle<M> copyOf(R2MaterialDepthSingleType<M> instance)

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

    - #### builder

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

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

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