Package com.io7m.jnoisetype.api
Class NTInfo
java.lang.Object
com.io7m.jnoisetype.api.NTInfo
- All Implemented Interfaces:
NTInfoType
- See Also:
-
- "SoundFontⓡ Technical Specification 2.04, §5 The INFO-list Chunk"
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic NTInfo.Builder
builder()
Creates a builder forNTInfo
.comment()
static NTInfo
copyOf
(NTInfoType instance) Creates an immutable copy of aNTInfoType
value.boolean
This instance is equal to all instances ofNTInfo
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:version
,soundEngine
,name
,rom
,romRevision
,creationDate
,engineers
,product
,copyright
,comment
,software
.name()
product()
rom()
software()
toString()
Prints the immutable valueNTInfo
with attribute values.version()
final NTInfo
withComment
(NTLongString value) Copy the current immutable object by setting a present value for the optionalcomment
attribute.final NTInfo
withComment
(Optional<? extends NTLongString> optional) Copy the current immutable object by setting an optional value for thecomment
attribute.final NTInfo
withCopyright
(NTShortString value) Copy the current immutable object by setting a present value for the optionalcopyright
attribute.final NTInfo
withCopyright
(Optional<? extends NTShortString> optional) Copy the current immutable object by setting an optional value for thecopyright
attribute.final NTInfo
withCreationDate
(NTShortString value) Copy the current immutable object by setting a present value for the optionalcreationDate
attribute.final NTInfo
withCreationDate
(Optional<? extends NTShortString> optional) Copy the current immutable object by setting an optional value for thecreationDate
attribute.final NTInfo
withEngineers
(NTShortString value) Copy the current immutable object by setting a present value for the optionalengineers
attribute.final NTInfo
withEngineers
(Optional<? extends NTShortString> optional) Copy the current immutable object by setting an optional value for theengineers
attribute.final NTInfo
withName
(NTShortString value) Copy the current immutable object by setting a value for thename
attribute.final NTInfo
withProduct
(NTShortString value) Copy the current immutable object by setting a present value for the optionalproduct
attribute.final NTInfo
withProduct
(Optional<? extends NTShortString> optional) Copy the current immutable object by setting an optional value for theproduct
attribute.final NTInfo
withRom
(NTShortString value) Copy the current immutable object by setting a present value for the optionalrom
attribute.final NTInfo
withRom
(Optional<? extends NTShortString> optional) Copy the current immutable object by setting an optional value for therom
attribute.final NTInfo
withRomRevision
(NTVersion value) Copy the current immutable object by setting a present value for the optionalromRevision
attribute.final NTInfo
withRomRevision
(Optional<? extends NTVersion> optional) Copy the current immutable object by setting an optional value for theromRevision
attribute.final NTInfo
withSoftware
(NTShortString value) Copy the current immutable object by setting a present value for the optionalsoftware
attribute.final NTInfo
withSoftware
(Optional<? extends NTShortString> optional) Copy the current immutable object by setting an optional value for thesoftware
attribute.final NTInfo
withSoundEngine
(NTShortString value) Copy the current immutable object by setting a value for thesoundEngine
attribute.final NTInfo
withVersion
(NTVersion value) Copy the current immutable object by setting a value for theversion
attribute.
-
Method Details
-
version
- Specified by:
version
in interfaceNTInfoType
- Returns:
- The version of the specification to which the file is expected to comply
-
soundEngine
- Specified by:
soundEngine
in interfaceNTInfoType
- Returns:
- The wavetable sound engine for which the file was optimized
-
name
- Specified by:
name
in interfaceNTInfoType
- Returns:
- The name of the SoundFont compatible bank
-
rom
- Specified by:
rom
in interfaceNTInfoType
- Returns:
- A particular wavetable sound data ROM to which any ROM samples refer
-
romRevision
- Specified by:
romRevision
in interfaceNTInfoType
- Returns:
- The particular wavetable sound data ROM revision to which any ROM samples refer
-
creationDate
- Specified by:
creationDate
in interfaceNTInfoType
- Returns:
- The creation date of the SoundFont
-
engineers
- Specified by:
engineers
in interfaceNTInfoType
- Returns:
- The engineers responsible for the creation of the SoundFont
-
product
- Specified by:
product
in interfaceNTInfoType
- Returns:
- Any specific product for which the SoundFont compatible bank is intended
-
copyright
- Specified by:
copyright
in interfaceNTInfoType
- Returns:
- Any copyright assertion string associated with the SoundFont compatible bank
-
comment
- Specified by:
comment
in interfaceNTInfoType
- Returns:
- Any comment text associated with the SoundFont compatible bank
-
software
- Specified by:
software
in interfaceNTInfoType
- Returns:
- The SoundFont compatible tools used to create and most recently modify the SoundFont compatible bank
-
withVersion
Copy the current immutable object by setting a value for theversion
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for version- Returns:
- A modified copy of the
this
object
-
withSoundEngine
Copy the current immutable object by setting a value for thesoundEngine
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for soundEngine- Returns:
- A modified copy of the
this
object
-
withName
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
-
withRom
Copy the current immutable object by setting a present value for the optionalrom
attribute.- Parameters:
value
- The value for rom- Returns:
- A modified copy of
this
object
-
withRom
Copy the current immutable object by setting an optional value for therom
attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis
.- Parameters:
optional
- A value for rom- Returns:
- A modified copy of
this
object
-
withRomRevision
Copy the current immutable object by setting a present value for the optionalromRevision
attribute.- Parameters:
value
- The value for romRevision- Returns:
- A modified copy of
this
object
-
withRomRevision
Copy the current immutable object by setting an optional value for theromRevision
attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis
.- Parameters:
optional
- A value for romRevision- Returns:
- A modified copy of
this
object
-
withCreationDate
Copy the current immutable object by setting a present value for the optionalcreationDate
attribute.- Parameters:
value
- The value for creationDate- Returns:
- A modified copy of
this
object
-
withCreationDate
Copy the current immutable object by setting an optional value for thecreationDate
attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis
.- Parameters:
optional
- A value for creationDate- Returns:
- A modified copy of
this
object
-
withEngineers
Copy the current immutable object by setting a present value for the optionalengineers
attribute.- Parameters:
value
- The value for engineers- Returns:
- A modified copy of
this
object
-
withEngineers
Copy the current immutable object by setting an optional value for theengineers
attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis
.- Parameters:
optional
- A value for engineers- Returns:
- A modified copy of
this
object
-
withProduct
Copy the current immutable object by setting a present value for the optionalproduct
attribute.- Parameters:
value
- The value for product- Returns:
- A modified copy of
this
object
-
withProduct
Copy the current immutable object by setting an optional value for theproduct
attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis
.- Parameters:
optional
- A value for product- Returns:
- A modified copy of
this
object
-
withCopyright
Copy the current immutable object by setting a present value for the optionalcopyright
attribute.- Parameters:
value
- The value for copyright- Returns:
- A modified copy of
this
object
-
withCopyright
Copy the current immutable object by setting an optional value for thecopyright
attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis
.- Parameters:
optional
- A value for copyright- Returns:
- A modified copy of
this
object
-
withComment
Copy the current immutable object by setting a present value for the optionalcomment
attribute.- Parameters:
value
- The value for comment- Returns:
- A modified copy of
this
object
-
withComment
Copy the current immutable object by setting an optional value for thecomment
attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis
.- Parameters:
optional
- A value for comment- Returns:
- A modified copy of
this
object
-
withSoftware
Copy the current immutable object by setting a present value for the optionalsoftware
attribute.- Parameters:
value
- The value for software- Returns:
- A modified copy of
this
object
-
withSoftware
Copy the current immutable object by setting an optional value for thesoftware
attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis
.- Parameters:
optional
- A value for software- Returns:
- A modified copy of
this
object
-
equals
This instance is equal to all instances ofNTInfo
that have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:version
,soundEngine
,name
,rom
,romRevision
,creationDate
,engineers
,product
,copyright
,comment
,software
. -
toString
Prints the immutable valueNTInfo
with attribute values. -
copyOf
Creates an immutable copy of aNTInfoType
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 NTInfo instance
-
builder
Creates a builder forNTInfo
.NTInfo.builder() .setVersion(com.io7m.jnoisetype.api.NTVersion) // required
version
.setSoundEngine(com.io7m.jnoisetype.api.NTShortString) // optionalsoundEngine
.setName(com.io7m.jnoisetype.api.NTShortString) // requiredname
.setRom(NTShortString) // optionalrom
.setRomRevision(NTVersion) // optionalromRevision
.setCreationDate(NTShortString) // optionalcreationDate
.setEngineers(NTShortString) // optionalengineers
.setProduct(NTShortString) // optionalproduct
.setCopyright(NTShortString) // optionalcopyright
.setComment(NTLongString) // optionalcomment
.setSoftware(NTShortString) // optionalsoftware
.build();- Returns:
- A new NTInfo builder
-