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 classSMFMemoryMeshFilterCheckConfiguration.BuilderBuilds instances of typeSMFMemoryMeshFilterCheckConfiguration.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SMFMemoryMeshFilterCheckConfiguration.Builderbuilder()Creates a builder forSMFMemoryMeshFilterCheckConfiguration.java.util.OptionalIntcomponentCount()java.util.OptionalIntcomponentSize()java.util.Optional<SMFComponentType>componentType()static SMFMemoryMeshFilterCheckConfigurationcopyOf(SMFMemoryMeshFilterCheckConfigurationType instance)Creates an immutable copy of aSMFMemoryMeshFilterCheckConfigurationTypevalue.booleanequals(java.lang.Object another)This instance is equal to all instances ofSMFMemoryMeshFilterCheckConfigurationthat have equal attribute values.inthashCode()Computes a hash code from attributes:name,componentType,componentCount,componentSize.SMFAttributeNamename()static SMFMemoryMeshFilterCheckConfigurationof(SMFAttributeName name, java.util.Optional<? extends SMFComponentType> componentType, java.util.OptionalInt componentCount, java.util.OptionalInt componentSize)Construct a new immutableSMFMemoryMeshFilterCheckConfigurationinstance.java.lang.StringtoString()Prints the immutable valueSMFMemoryMeshFilterCheckConfigurationwith attribute values.SMFMemoryMeshFilterCheckConfigurationwithComponentCount(int value)Copy the current immutable object by setting a present value for the optionalcomponentCountattribute.SMFMemoryMeshFilterCheckConfigurationwithComponentCount(java.util.OptionalInt optional)Copy the current immutable object by setting an optional value for thecomponentCountattribute.SMFMemoryMeshFilterCheckConfigurationwithComponentSize(int value)Copy the current immutable object by setting a present value for the optionalcomponentSizeattribute.SMFMemoryMeshFilterCheckConfigurationwithComponentSize(java.util.OptionalInt optional)Copy the current immutable object by setting an optional value for thecomponentSizeattribute.SMFMemoryMeshFilterCheckConfigurationwithComponentType(SMFComponentType value)Copy the current immutable object by setting a present value for the optionalcomponentTypeattribute.SMFMemoryMeshFilterCheckConfigurationwithComponentType(java.util.Optional<? extends SMFComponentType> optional)Copy the current immutable object by setting an optional value for thecomponentTypeattribute.SMFMemoryMeshFilterCheckConfigurationwithName(SMFAttributeName value)Copy the current immutable object by setting a value for thenameattribute.
-
-
-
Method Detail
-
name
public SMFAttributeName name()
- Specified by:
namein interfaceSMFMemoryMeshFilterCheckConfigurationType- Returns:
- The name of the attribute
-
componentType
public java.util.Optional<SMFComponentType> componentType()
- Specified by:
componentTypein interfaceSMFMemoryMeshFilterCheckConfigurationType- Returns:
- The type of components
-
componentCount
public java.util.OptionalInt componentCount()
- Specified by:
componentCountin interfaceSMFMemoryMeshFilterCheckConfigurationType- Returns:
- The number of components per element
-
componentSize
public java.util.OptionalInt componentSize()
- Specified by:
componentSizein 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 thenameattribute. 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
thisobject
-
withComponentType
public final SMFMemoryMeshFilterCheckConfiguration withComponentType(SMFComponentType value)
Copy the current immutable object by setting a present value for the optionalcomponentTypeattribute.- Parameters:
value- The value for componentType- Returns:
- A modified copy of
thisobject
-
withComponentType
public final SMFMemoryMeshFilterCheckConfiguration withComponentType(java.util.Optional<? extends SMFComponentType> optional)
Copy the current immutable object by setting an optional value for thecomponentTypeattribute. 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
thisobject
-
withComponentCount
public final SMFMemoryMeshFilterCheckConfiguration withComponentCount(int value)
Copy the current immutable object by setting a present value for the optionalcomponentCountattribute.- Parameters:
value- The value for componentCount- Returns:
- A modified copy of
thisobject
-
withComponentCount
public final SMFMemoryMeshFilterCheckConfiguration withComponentCount(java.util.OptionalInt optional)
Copy the current immutable object by setting an optional value for thecomponentCountattribute. 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
thisobject
-
withComponentSize
public final SMFMemoryMeshFilterCheckConfiguration withComponentSize(int value)
Copy the current immutable object by setting a present value for the optionalcomponentSizeattribute.- Parameters:
value- The value for componentSize- Returns:
- A modified copy of
thisobject
-
withComponentSize
public final SMFMemoryMeshFilterCheckConfiguration withComponentSize(java.util.OptionalInt optional)
Copy the current immutable object by setting an optional value for thecomponentSizeattribute. 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
thisobject
-
equals
public boolean equals(java.lang.Object another)
This instance is equal to all instances ofSMFMemoryMeshFilterCheckConfigurationthat have equal attribute values.- Overrides:
equalsin classjava.lang.Object- Returns:
trueifthisis equal toanotherinstance
-
hashCode
public int hashCode()
Computes a hash code from attributes:name,componentType,componentCount,componentSize.- Overrides:
hashCodein classjava.lang.Object- Returns:
- hashCode value
-
toString
public java.lang.String toString()
Prints the immutable valueSMFMemoryMeshFilterCheckConfigurationwith attribute values.- Overrides:
toStringin 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 immutableSMFMemoryMeshFilterCheckConfigurationinstance.- Parameters:
name- The value for thenameattributecomponentType- The value for thecomponentTypeattributecomponentCount- The value for thecomponentCountattributecomponentSize- The value for thecomponentSizeattribute- Returns:
- An immutable SMFMemoryMeshFilterCheckConfiguration instance
-
copyOf
public static SMFMemoryMeshFilterCheckConfiguration copyOf(SMFMemoryMeshFilterCheckConfigurationType instance)
Creates an immutable copy of aSMFMemoryMeshFilterCheckConfigurationTypevalue. 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) // requiredname.setComponentType(com.io7m.smfj.core.SMFComponentType) // optionalcomponentType.setComponentCount(int) // optionalcomponentCount.setComponentSize(int) // optionalcomponentSize.build();- Returns:
- A new SMFMemoryMeshFilterCheckConfiguration builder
-
-