Package com.io7m.jnoisetype.api
Class NTTransform
java.lang.Object
com.io7m.jnoisetype.api.NTTransform
- All Implemented Interfaces:
NTTransformType
- See Also:
-
- "SoundFontⓡ Technical Specification 2.04, §8.3 Modulator Transform Enumerators"
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic NTTransform.Builderbuilder()Creates a builder forNTTransform.static NTTransformcopyOf(NTTransformType instance) Creates an immutable copy of aNTTransformTypevalue.booleanThis instance is equal to all instances ofNTTransformthat have equal attribute values.inthashCode()Computes a hash code from attributes:index,name.index()name()static NTTransformof(NTTransformIndex index, String name) Construct a new immutableNTTransforminstance.toString()Prints the immutable valueNTTransformwith attribute values.final NTTransformwithIndex(NTTransformIndex value) Copy the current immutable object by setting a value for theindexattribute.final NTTransformCopy the current immutable object by setting a value for thenameattribute.
-
Method Details
-
index
- Specified by:
indexin interfaceNTTransformType- Returns:
- The transform index
-
name
- Specified by:
namein interfaceNTTransformType- Returns:
- The transform name
-
withIndex
Copy the current immutable object by setting a value for theindexattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for index- Returns:
- A modified copy of the
thisobject
-
withName
Copy the current immutable object by setting a value for thenameattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for name- Returns:
- A modified copy of the
thisobject
-
equals
This instance is equal to all instances ofNTTransformthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:index,name. -
toString
Prints the immutable valueNTTransformwith attribute values. -
of
Construct a new immutableNTTransforminstance.- Parameters:
index- The value for theindexattributename- The value for thenameattribute- Returns:
- An immutable NTTransform instance
-
copyOf
Creates an immutable copy of aNTTransformTypevalue. 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 NTTransform instance
-
builder
Creates a builder forNTTransform.NTTransform.builder() .setIndex(com.io7m.jnoisetype.api.NTTransformIndex) // requiredindex.setName(String) // requiredname.build();- Returns:
- A new NTTransform builder
-