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 classSMFMemoryMeshFilterTrianglesOptimizeConfiguration.BuilderBuilds instances of typeSMFMemoryMeshFilterTrianglesOptimizeConfiguration.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SMFMemoryMeshFilterTrianglesOptimizeConfiguration.Builderbuilder()Creates a builder forSMFMemoryMeshFilterTrianglesOptimizeConfiguration.static SMFMemoryMeshFilterTrianglesOptimizeConfigurationcopyOf(SMFMemoryMeshFilterTrianglesOptimizeConfigurationType instance)Creates an immutable copy of aSMFMemoryMeshFilterTrianglesOptimizeConfigurationTypevalue.booleanequals(java.lang.Object another)This instance is equal to all instances ofSMFMemoryMeshFilterTrianglesOptimizeConfigurationthat have equal attribute values.inthashCode()Computes a hash code from attributes:optimize,validate.static SMFMemoryMeshFilterTrianglesOptimizeConfigurationof(java.util.OptionalInt optimize, boolean validate)Construct a new immutableSMFMemoryMeshFilterTrianglesOptimizeConfigurationinstance.java.util.OptionalIntoptimize()A specification of whether triangles should be optimized.java.lang.StringtoString()Prints the immutable valueSMFMemoryMeshFilterTrianglesOptimizeConfigurationwith attribute values.booleanvalidate()A specification of whether or not triangle indices should be validated.SMFMemoryMeshFilterTrianglesOptimizeConfigurationwithOptimize(int value)Copy the current immutable object by setting a present value for the optionaloptimizeattribute.SMFMemoryMeshFilterTrianglesOptimizeConfigurationwithOptimize(java.util.OptionalInt optional)Copy the current immutable object by setting an optional value for theoptimizeattribute.SMFMemoryMeshFilterTrianglesOptimizeConfigurationwithValidate(boolean value)Copy the current immutable object by setting a value for thevalidateattribute.-
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:
optimizein interfaceSMFMemoryMeshFilterTrianglesOptimizeConfigurationType- 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:
validatein interfaceSMFMemoryMeshFilterTrianglesOptimizeConfigurationType- Returns:
trueiff triangle indices should be validated
-
withOptimize
public final SMFMemoryMeshFilterTrianglesOptimizeConfiguration withOptimize(int value)
Copy the current immutable object by setting a present value for the optionaloptimizeattribute.- Parameters:
value- The value for optimize- Returns:
- A modified copy of
thisobject
-
withOptimize
public final SMFMemoryMeshFilterTrianglesOptimizeConfiguration withOptimize(java.util.OptionalInt optional)
Copy the current immutable object by setting an optional value for theoptimizeattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for optimize- Returns:
- A modified copy of
thisobject
-
withValidate
public final SMFMemoryMeshFilterTrianglesOptimizeConfiguration withValidate(boolean value)
Copy the current immutable object by setting a value for thevalidateattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for validate- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(java.lang.Object another)
This instance is equal to all instances ofSMFMemoryMeshFilterTrianglesOptimizeConfigurationthat have equal attribute values.- Overrides:
equalsin classjava.lang.Object- Returns:
trueifthisis equal toanotherinstance
-
hashCode
public int hashCode()
Computes a hash code from attributes:optimize,validate.- Overrides:
hashCodein classjava.lang.Object- Returns:
- hashCode value
-
toString
public java.lang.String toString()
Prints the immutable valueSMFMemoryMeshFilterTrianglesOptimizeConfigurationwith attribute values.- Overrides:
toStringin classjava.lang.Object- Returns:
- A string representation of the value
-
of
public static SMFMemoryMeshFilterTrianglesOptimizeConfiguration of(java.util.OptionalInt optimize, boolean validate)
Construct a new immutableSMFMemoryMeshFilterTrianglesOptimizeConfigurationinstance.- Parameters:
optimize- The value for theoptimizeattributevalidate- The value for thevalidateattribute- Returns:
- An immutable SMFMemoryMeshFilterTrianglesOptimizeConfiguration instance
-
copyOf
public static SMFMemoryMeshFilterTrianglesOptimizeConfiguration copyOf(SMFMemoryMeshFilterTrianglesOptimizeConfigurationType instance)
Creates an immutable copy of aSMFMemoryMeshFilterTrianglesOptimizeConfigurationTypevalue. 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 forSMFMemoryMeshFilterTrianglesOptimizeConfiguration.SMFMemoryMeshFilterTrianglesOptimizeConfiguration.builder() .setOptimize(int) // optionaloptimize.setValidate(boolean) // requiredvalidate.build();- Returns:
- A new SMFMemoryMeshFilterTrianglesOptimizeConfiguration builder
-
-