com.io7m.r2.core

## Class R2TranslucentSingle<M>

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

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

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

  The type of single instance translucents.

- - ### Nested Class Summary

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

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Optional<com.io7m.jcanephora.renderstate.JCGLBlendState>` | `blending()`
    `static <M> R2TranslucentSingle.Builder<M>` | `builder()` Creates a builder for `R2TranslucentSingle`.
    `static <M> R2TranslucentSingle<M>` | `copyOf(R2TranslucentSingleType<M> instance)` Creates an immutable copy of a `R2TranslucentSingleType` value.
    `com.io7m.jcanephora.renderstate.JCGLCullingState` | `culling()`
    `boolean` | `equals(Object another)` This instance is equal to all instances of `R2TranslucentSingle` that have equal attribute values.
    `int` | `hashCode()` Computes a hash code from attributes: `instance`, `shader`, `shaderParameters`, `blending`, `culling`.
    `R2InstanceSingleType` | `instance()`
    `static <M> R2TranslucentSingle<M>` | `of(R2InstanceSingleType instance, R2ShaderTranslucentInstanceSingleType<M> shader, M shaderParameters, Optional<com.io7m.jcanephora.renderstate.JCGLBlendState> blending, com.io7m.jcanephora.renderstate.JCGLCullingState culling)` Construct a new immutable `R2TranslucentSingle` instance.
    `R2ShaderTranslucentInstanceSingleType<M>` | `shader()`
    `M` | `shaderParameters()`
    `String` | `toString()` Prints the immutable value `R2TranslucentSingle` with attribute values.
    `R2TranslucentSingle<M>` | `withBlending(com.io7m.jcanephora.renderstate.JCGLBlendState value)` Copy the current immutable object by setting a present value for the optional `blending` attribute.
    `R2TranslucentSingle<M>` | `withBlending(Optional<com.io7m.jcanephora.renderstate.JCGLBlendState> optional)` Copy the current immutable object by setting an optional value for the `blending` attribute.
    `R2TranslucentSingle<M>` | `withCulling(com.io7m.jcanephora.renderstate.JCGLCullingState value)` Copy the current immutable object by setting a value for the `culling` attribute.
    `R2TranslucentSingle<M>` | `withInstance(R2InstanceSingleType value)` Copy the current immutable object by setting a value for the `instance` attribute.
    `R2TranslucentSingle<M>` | `withShader(R2ShaderTranslucentInstanceSingleType<M> value)` Copy the current immutable object by setting a value for the `shader` attribute.
    `R2TranslucentSingle<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`

    - ### Methods inherited from interface com.io7m.r2.core.R2TranslucentSingleType

      `matchTranslucent`

    - ### Methods inherited from interface com.io7m.r2.core.R2TranslucentType

      `shaderParametersType`

- - ### Method Detail

    - #### instance

          public R2InstanceSingleType instance()

      Specified by:
        `instance` in interface `R2TranslucentSingleType<M>`
      Returns:
        The instance to be rendered

    - #### shader

          public R2ShaderTranslucentInstanceSingleType<M> shader()

      Specified by:
        `shader` in interface `R2TranslucentSingleType<M>`
      Returns:
        The shader

    - #### shaderParameters

          public M shaderParameters()

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

    - #### blending

          public Optional<com.io7m.jcanephora.renderstate.JCGLBlendState> blending()

      Specified by:
        `blending` in interface `R2TranslucentSingleType<M>`
      Specified by:
        `blending` in interface `R2TranslucentType<M>`
      Returns:
        The value of the `blending` attribute

    - #### culling

          public com.io7m.jcanephora.renderstate.JCGLCullingState culling()

      Specified by:
        `culling` in interface `R2TranslucentSingleType<M>`
      Specified by:
        `culling` in interface `R2TranslucentType<M>`
      Returns:
        The value of the `culling` attribute

    - #### withInstance

          public final R2TranslucentSingle<M> withInstance(R2InstanceSingleType value)

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

    - #### withShader

          public final R2TranslucentSingle<M> withShader(R2ShaderTranslucentInstanceSingleType<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 R2TranslucentSingle<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

    - #### withBlending

          public final R2TranslucentSingle<M> withBlending(com.io7m.jcanephora.renderstate.JCGLBlendState value)

      Copy the current immutable object by setting a present value for the optional `blending` attribute.
      Parameters:
        `value` - The value for blending
      Returns:
        A modified copy of `this` object

    - #### withBlending

          public final R2TranslucentSingle<M> withBlending(Optional<com.io7m.jcanephora.renderstate.JCGLBlendState> optional)

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

    - #### withCulling

          public final R2TranslucentSingle<M> withCulling(com.io7m.jcanephora.renderstate.JCGLCullingState value)

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

    - #### equals

          public boolean equals(Object another)

      This instance is equal to all instances of `R2TranslucentSingle` 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: `instance`, `shader`, `shaderParameters`, `blending`, `culling`.
      Overrides:
        `hashCode` in class `Object`
      Returns:
        hashCode value

    - #### toString

          public String toString()

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

    - #### of

          public static <M> R2TranslucentSingle<M> of(R2InstanceSingleType instance,
                                                      R2ShaderTranslucentInstanceSingleType<M> shader,
                                                      M shaderParameters,
                                                      Optional<com.io7m.jcanephora.renderstate.JCGLBlendState> blending,
                                                      com.io7m.jcanephora.renderstate.JCGLCullingState culling)

      Construct a new immutable `R2TranslucentSingle` instance.
      Parameters:
        `instance` - The value for the `instance` attribute
        `shader` - The value for the `shader` attribute
        `shaderParameters` - The value for the `shaderParameters` attribute
        `blending` - The value for the `blending` attribute
        `culling` - The value for the `culling` attribute
      Returns:
        An immutable R2TranslucentSingle instance

    - #### copyOf

          public static <M> R2TranslucentSingle<M> copyOf(R2TranslucentSingleType<M> instance)

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

    - #### builder

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

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

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