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
-
Method Summary
Modifier and TypeMethodDescriptionstatic NTTransform.Builder
builder()
Creates a builder forNTTransform
.static NTTransform
copyOf
(NTTransformType instance) Creates an immutable copy of aNTTransformType
value.boolean
This instance is equal to all instances ofNTTransform
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:index
,name
.index()
name()
static NTTransform
of
(NTTransformIndex index, String name) Construct a new immutableNTTransform
instance.toString()
Prints the immutable valueNTTransform
with attribute values.final NTTransform
withIndex
(NTTransformIndex value) Copy the current immutable object by setting a value for theindex
attribute.final NTTransform
Copy the current immutable object by setting a value for thename
attribute.
-
Method Details
-
index
- Specified by:
index
in interfaceNTTransformType
- Returns:
- The transform index
-
name
- Specified by:
name
in interfaceNTTransformType
- Returns:
- The transform name
-
withIndex
Copy the current immutable object by setting a value for theindex
attribute. 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
this
object
-
withName
Copy the current immutable object by setting a value for thename
attribute. 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
this
object
-
equals
This instance is equal to all instances ofNTTransform
that have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:index
,name
. -
toString
Prints the immutable valueNTTransform
with attribute values. -
of
Construct a new immutableNTTransform
instance.- Parameters:
index
- The value for theindex
attributename
- The value for thename
attribute- Returns:
- An immutable NTTransform instance
-
copyOf
Creates an immutable copy of aNTTransformType
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 NTTransform instance
-
builder
Creates a builder forNTTransform
.NTTransform.builder() .setIndex(com.io7m.jnoisetype.api.NTTransformIndex) // required
index
.setName(String) // requiredname
.build();- Returns:
- A new NTTransform builder
-