Package com.io7m.smfj.processing.main
Class SMFMemoryMeshFilterCheckConfiguration
- java.lang.Object
-
- com.io7m.smfj.processing.main.SMFMemoryMeshFilterCheckConfiguration
-
- All Implemented Interfaces:
SMFMemoryMeshFilterCheckConfigurationType
public final class SMFMemoryMeshFilterCheckConfiguration extends java.lang.Object implements SMFMemoryMeshFilterCheckConfigurationType
A specification of how an attribute should be checked.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SMFMemoryMeshFilterCheckConfiguration.Builder
Builds instances of typeSMFMemoryMeshFilterCheckConfiguration
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SMFMemoryMeshFilterCheckConfiguration.Builder
builder()
Creates a builder forSMFMemoryMeshFilterCheckConfiguration
.java.util.OptionalInt
componentCount()
java.util.OptionalInt
componentSize()
java.util.Optional<SMFComponentType>
componentType()
static SMFMemoryMeshFilterCheckConfiguration
copyOf(SMFMemoryMeshFilterCheckConfigurationType instance)
Creates an immutable copy of aSMFMemoryMeshFilterCheckConfigurationType
value.boolean
equals(java.lang.Object another)
This instance is equal to all instances ofSMFMemoryMeshFilterCheckConfiguration
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:name
,componentType
,componentCount
,componentSize
.SMFAttributeName
name()
static SMFMemoryMeshFilterCheckConfiguration
of(SMFAttributeName name, java.util.Optional<? extends SMFComponentType> componentType, java.util.OptionalInt componentCount, java.util.OptionalInt componentSize)
Construct a new immutableSMFMemoryMeshFilterCheckConfiguration
instance.java.lang.String
toString()
Prints the immutable valueSMFMemoryMeshFilterCheckConfiguration
with attribute values.SMFMemoryMeshFilterCheckConfiguration
withComponentCount(int value)
Copy the current immutable object by setting a present value for the optionalcomponentCount
attribute.SMFMemoryMeshFilterCheckConfiguration
withComponentCount(java.util.OptionalInt optional)
Copy the current immutable object by setting an optional value for thecomponentCount
attribute.SMFMemoryMeshFilterCheckConfiguration
withComponentSize(int value)
Copy the current immutable object by setting a present value for the optionalcomponentSize
attribute.SMFMemoryMeshFilterCheckConfiguration
withComponentSize(java.util.OptionalInt optional)
Copy the current immutable object by setting an optional value for thecomponentSize
attribute.SMFMemoryMeshFilterCheckConfiguration
withComponentType(SMFComponentType value)
Copy the current immutable object by setting a present value for the optionalcomponentType
attribute.SMFMemoryMeshFilterCheckConfiguration
withComponentType(java.util.Optional<? extends SMFComponentType> optional)
Copy the current immutable object by setting an optional value for thecomponentType
attribute.SMFMemoryMeshFilterCheckConfiguration
withName(SMFAttributeName value)
Copy the current immutable object by setting a value for thename
attribute.
-
-
-
Method Detail
-
name
public SMFAttributeName name()
- Specified by:
name
in interfaceSMFMemoryMeshFilterCheckConfigurationType
- Returns:
- The name of the attribute
-
componentType
public java.util.Optional<SMFComponentType> componentType()
- Specified by:
componentType
in interfaceSMFMemoryMeshFilterCheckConfigurationType
- Returns:
- The type of components
-
componentCount
public java.util.OptionalInt componentCount()
- Specified by:
componentCount
in interfaceSMFMemoryMeshFilterCheckConfigurationType
- Returns:
- The number of components per element
-
componentSize
public java.util.OptionalInt componentSize()
- Specified by:
componentSize
in interfaceSMFMemoryMeshFilterCheckConfigurationType
- Returns:
- The size of components in bits
-
withName
public final SMFMemoryMeshFilterCheckConfiguration withName(SMFAttributeName value)
Copy the current immutable object by setting a value for thename
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for name- Returns:
- A modified copy of the
this
object
-
withComponentType
public final SMFMemoryMeshFilterCheckConfiguration withComponentType(SMFComponentType value)
Copy the current immutable object by setting a present value for the optionalcomponentType
attribute.- Parameters:
value
- The value for componentType- Returns:
- A modified copy of
this
object
-
withComponentType
public final SMFMemoryMeshFilterCheckConfiguration withComponentType(java.util.Optional<? extends SMFComponentType> optional)
Copy the current immutable object by setting an optional value for thecomponentType
attribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis
.- Parameters:
optional
- A value for componentType- Returns:
- A modified copy of
this
object
-
withComponentCount
public final SMFMemoryMeshFilterCheckConfiguration withComponentCount(int value)
Copy the current immutable object by setting a present value for the optionalcomponentCount
attribute.- Parameters:
value
- The value for componentCount- Returns:
- A modified copy of
this
object
-
withComponentCount
public final SMFMemoryMeshFilterCheckConfiguration withComponentCount(java.util.OptionalInt optional)
Copy the current immutable object by setting an optional value for thecomponentCount
attribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis
.- Parameters:
optional
- A value for componentCount- Returns:
- A modified copy of
this
object
-
withComponentSize
public final SMFMemoryMeshFilterCheckConfiguration withComponentSize(int value)
Copy the current immutable object by setting a present value for the optionalcomponentSize
attribute.- Parameters:
value
- The value for componentSize- Returns:
- A modified copy of
this
object
-
withComponentSize
public final SMFMemoryMeshFilterCheckConfiguration withComponentSize(java.util.OptionalInt optional)
Copy the current immutable object by setting an optional value for thecomponentSize
attribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis
.- Parameters:
optional
- A value for componentSize- Returns:
- A modified copy of
this
object
-
equals
public boolean equals(java.lang.Object another)
This instance is equal to all instances ofSMFMemoryMeshFilterCheckConfiguration
that have equal attribute values.- Overrides:
equals
in classjava.lang.Object
- Returns:
true
ifthis
is equal toanother
instance
-
hashCode
public int hashCode()
Computes a hash code from attributes:name
,componentType
,componentCount
,componentSize
.- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- hashCode value
-
toString
public java.lang.String toString()
Prints the immutable valueSMFMemoryMeshFilterCheckConfiguration
with attribute values.- Overrides:
toString
in classjava.lang.Object
- Returns:
- A string representation of the value
-
of
public static SMFMemoryMeshFilterCheckConfiguration of(SMFAttributeName name, java.util.Optional<? extends SMFComponentType> componentType, java.util.OptionalInt componentCount, java.util.OptionalInt componentSize)
Construct a new immutableSMFMemoryMeshFilterCheckConfiguration
instance.- Parameters:
name
- The value for thename
attributecomponentType
- The value for thecomponentType
attributecomponentCount
- The value for thecomponentCount
attributecomponentSize
- The value for thecomponentSize
attribute- Returns:
- An immutable SMFMemoryMeshFilterCheckConfiguration instance
-
copyOf
public static SMFMemoryMeshFilterCheckConfiguration copyOf(SMFMemoryMeshFilterCheckConfigurationType instance)
Creates an immutable copy of aSMFMemoryMeshFilterCheckConfigurationType
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 SMFMemoryMeshFilterCheckConfiguration instance
-
builder
public static SMFMemoryMeshFilterCheckConfiguration.Builder builder()
Creates a builder forSMFMemoryMeshFilterCheckConfiguration
.SMFMemoryMeshFilterCheckConfiguration.builder() .setName(com.io7m.smfj.core.SMFAttributeName) // required
name
.setComponentType(com.io7m.smfj.core.SMFComponentType) // optionalcomponentType
.setComponentCount(int) // optionalcomponentCount
.setComponentSize(int) // optionalcomponentSize
.build();- Returns:
- A new SMFMemoryMeshFilterCheckConfiguration builder
-
-