Package com.io7m.smfj.processing.main

## Class SMFMemoryMeshFilterTrianglesOptimizeConfiguration

- java.lang.Object
- - com.io7m.smfj.processing.main.SMFMemoryMeshFilterTrianglesOptimizeConfiguration

- All Implemented Interfaces:
    `SMFMemoryMeshFilterTrianglesOptimizeConfigurationType`

      public final class SMFMemoryMeshFilterTrianglesOptimizeConfiguration
      extends java.lang.Object
      implements SMFMemoryMeshFilterTrianglesOptimizeConfigurationType

  A specification of how triangles should be processed.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class | Description
    --- | --- | ---
    `static class` | `SMFMemoryMeshFilterTrianglesOptimizeConfiguration.Builder` | Builds instances of type `SMFMemoryMeshFilterTrianglesOptimizeConfiguration`.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static SMFMemoryMeshFilterTrianglesOptimizeConfiguration.Builder` | `builder()` | Creates a builder for `SMFMemoryMeshFilterTrianglesOptimizeConfiguration`.
    `static SMFMemoryMeshFilterTrianglesOptimizeConfiguration` | `copyOf​(SMFMemoryMeshFilterTrianglesOptimizeConfigurationType instance)` | Creates an immutable copy of a `SMFMemoryMeshFilterTrianglesOptimizeConfigurationType` value.
    `boolean` | `equals​(java.lang.Object another)` | This instance is equal to all instances of `SMFMemoryMeshFilterTrianglesOptimizeConfiguration` that have equal attribute values.
    `int` | `hashCode()` | Computes a hash code from attributes: `optimize`, `validate`.
    `static SMFMemoryMeshFilterTrianglesOptimizeConfiguration` | `of​(java.util.OptionalInt optimize, boolean validate)` | Construct a new immutable `SMFMemoryMeshFilterTrianglesOptimizeConfiguration` instance.
    `java.util.OptionalInt` | `optimize()` | A specification of whether triangles should be optimized.
    `java.lang.String` | `toString()` | Prints the immutable value `SMFMemoryMeshFilterTrianglesOptimizeConfiguration` with attribute values.
    `boolean` | `validate()` | A specification of whether or not triangle indices should be validated.
    `SMFMemoryMeshFilterTrianglesOptimizeConfiguration` | `withOptimize​(int value)` | Copy the current immutable object by setting a present value for the optional `optimize` attribute.
    `SMFMemoryMeshFilterTrianglesOptimizeConfiguration` | `withOptimize​(java.util.OptionalInt optional)` | Copy the current immutable object by setting an optional value for the `optimize` attribute.
    `SMFMemoryMeshFilterTrianglesOptimizeConfiguration` | `withValidate​(boolean value)` | Copy the current immutable object by setting a value for the `validate` attribute.

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

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

    - ### Methods inherited from interface com.io7m.smfj.processing.main.SMFMemoryMeshFilterTrianglesOptimizeConfigurationType

      `checkPreconditions`

- - ### Method Detail

    - #### optimize

          public java.util.OptionalInt optimize()

      A specification of whether triangles should be optimized. If a value is provided, it represents the smallest size in bits that an implementation is allowed to use for triangle indices. If no value is specified, optimization is not performed.
      Specified by:
        `optimize` in interface `SMFMemoryMeshFilterTrianglesOptimizeConfigurationType`
      Returns:
        The minimum size of triangle indices, if any

    - #### validate

          public boolean validate()

      A specification of whether or not triangle indices should be validated. A triangle index is valid iff there is an existing vertex with the same index value.
      Specified by:
        `validate` in interface `SMFMemoryMeshFilterTrianglesOptimizeConfigurationType`
      Returns:
        `true` iff triangle indices should be validated

    - #### withOptimize

          public final SMFMemoryMeshFilterTrianglesOptimizeConfiguration withOptimize​(int value)

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

    - #### withOptimize

          public final SMFMemoryMeshFilterTrianglesOptimizeConfiguration withOptimize​(java.util.OptionalInt optional)

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

    - #### withValidate

          public final SMFMemoryMeshFilterTrianglesOptimizeConfiguration withValidate​(boolean value)

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

    - #### equals

          public boolean equals​(java.lang.Object another)

      This instance is equal to all instances of `SMFMemoryMeshFilterTrianglesOptimizeConfiguration` that have equal attribute values.
      Overrides:
        `equals` in class `java.lang.Object`
      Returns:
        `true` if `this` is equal to `another` instance

    - #### hashCode

          public int hashCode()

      Computes a hash code from attributes: `optimize`, `validate`.
      Overrides:
        `hashCode` in class `java.lang.Object`
      Returns:
        hashCode value

    - #### toString

          public java.lang.String toString()

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

    - #### of

          public static SMFMemoryMeshFilterTrianglesOptimizeConfiguration of​(java.util.OptionalInt optimize,
                                                                             boolean validate)

      Construct a new immutable `SMFMemoryMeshFilterTrianglesOptimizeConfiguration` instance.
      Parameters:
        `optimize` - The value for the `optimize` attribute
        `validate` - The value for the `validate` attribute
      Returns:
        An immutable SMFMemoryMeshFilterTrianglesOptimizeConfiguration instance

    - #### copyOf

          public static SMFMemoryMeshFilterTrianglesOptimizeConfiguration copyOf​(SMFMemoryMeshFilterTrianglesOptimizeConfigurationType instance)

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

    - #### builder

          public static SMFMemoryMeshFilterTrianglesOptimizeConfiguration.Builder builder()

      Creates a builder for `SMFMemoryMeshFilterTrianglesOptimizeConfiguration`.

           SMFMemoryMeshFilterTrianglesOptimizeConfiguration.builder()
              .setOptimize(int) // optional optimize
              .setValidate(boolean) // required validate
              .build();

      Returns:
        A new SMFMemoryMeshFilterTrianglesOptimizeConfiguration builder