Package com.io7m.jnoisetype.api
Class NTInfo.Builder
java.lang.Object
com.io7m.jnoisetype.api.NTInfo.Builder
- Enclosing class:
- NTInfo
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds a newNTInfo
.final NTInfo.Builder
from
(NTInfoType instance) Fill a builder with attribute values from the providedNTInfoType
instance.final NTInfo.Builder
setComment
(NTLongString comment) Initializes the optional valuecomment
to comment.final NTInfo.Builder
setComment
(Optional<? extends NTLongString> comment) Initializes the optional valuecomment
to comment.final NTInfo.Builder
setCopyright
(NTShortString copyright) Initializes the optional valuecopyright
to copyright.final NTInfo.Builder
setCopyright
(Optional<? extends NTShortString> copyright) Initializes the optional valuecopyright
to copyright.final NTInfo.Builder
setCreationDate
(NTShortString creationDate) Initializes the optional valuecreationDate
to creationDate.final NTInfo.Builder
setCreationDate
(Optional<? extends NTShortString> creationDate) Initializes the optional valuecreationDate
to creationDate.final NTInfo.Builder
setEngineers
(NTShortString engineers) Initializes the optional valueengineers
to engineers.final NTInfo.Builder
setEngineers
(Optional<? extends NTShortString> engineers) Initializes the optional valueengineers
to engineers.final NTInfo.Builder
setName
(NTShortString name) Initializes the value for thename
attribute.final NTInfo.Builder
setProduct
(NTShortString product) Initializes the optional valueproduct
to product.final NTInfo.Builder
setProduct
(Optional<? extends NTShortString> product) Initializes the optional valueproduct
to product.final NTInfo.Builder
setRom
(NTShortString rom) Initializes the optional valuerom
to rom.final NTInfo.Builder
setRom
(Optional<? extends NTShortString> rom) Initializes the optional valuerom
to rom.final NTInfo.Builder
setRomRevision
(NTVersion romRevision) Initializes the optional valueromRevision
to romRevision.final NTInfo.Builder
setRomRevision
(Optional<? extends NTVersion> romRevision) Initializes the optional valueromRevision
to romRevision.final NTInfo.Builder
setSoftware
(NTShortString software) Initializes the optional valuesoftware
to software.final NTInfo.Builder
setSoftware
(Optional<? extends NTShortString> software) Initializes the optional valuesoftware
to software.final NTInfo.Builder
setSoundEngine
(NTShortString soundEngine) Initializes the value for thesoundEngine
attribute.final NTInfo.Builder
setVersion
(NTVersion version) Initializes the value for theversion
attribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedNTInfoType
instance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
setVersion
Initializes the value for theversion
attribute.- Parameters:
version
- The value for version- Returns:
this
builder for use in a chained invocation
-
setSoundEngine
Initializes the value for thesoundEngine
attribute.If not set, this attribute will have a default value as returned by the initializer of
soundEngine
.- Parameters:
soundEngine
- The value for soundEngine- Returns:
this
builder for use in a chained invocation
-
setName
Initializes the value for thename
attribute.- Parameters:
name
- The value for name- Returns:
this
builder for use in a chained invocation
-
setRom
Initializes the optional valuerom
to rom.- Parameters:
rom
- The value for rom- Returns:
this
builder for chained invocation
-
setRom
Initializes the optional valuerom
to rom.- Parameters:
rom
- The value for rom- Returns:
this
builder for use in a chained invocation
-
setRomRevision
Initializes the optional valueromRevision
to romRevision.- Parameters:
romRevision
- The value for romRevision- Returns:
this
builder for chained invocation
-
setRomRevision
Initializes the optional valueromRevision
to romRevision.- Parameters:
romRevision
- The value for romRevision- Returns:
this
builder for use in a chained invocation
-
setCreationDate
Initializes the optional valuecreationDate
to creationDate.- Parameters:
creationDate
- The value for creationDate- Returns:
this
builder for chained invocation
-
setCreationDate
Initializes the optional valuecreationDate
to creationDate.- Parameters:
creationDate
- The value for creationDate- Returns:
this
builder for use in a chained invocation
-
setEngineers
Initializes the optional valueengineers
to engineers.- Parameters:
engineers
- The value for engineers- Returns:
this
builder for chained invocation
-
setEngineers
Initializes the optional valueengineers
to engineers.- Parameters:
engineers
- The value for engineers- Returns:
this
builder for use in a chained invocation
-
setProduct
Initializes the optional valueproduct
to product.- Parameters:
product
- The value for product- Returns:
this
builder for chained invocation
-
setProduct
Initializes the optional valueproduct
to product.- Parameters:
product
- The value for product- Returns:
this
builder for use in a chained invocation
-
setCopyright
Initializes the optional valuecopyright
to copyright.- Parameters:
copyright
- The value for copyright- Returns:
this
builder for chained invocation
-
setCopyright
Initializes the optional valuecopyright
to copyright.- Parameters:
copyright
- The value for copyright- Returns:
this
builder for use in a chained invocation
-
setComment
Initializes the optional valuecomment
to comment.- Parameters:
comment
- The value for comment- Returns:
this
builder for chained invocation
-
setComment
Initializes the optional valuecomment
to comment.- Parameters:
comment
- The value for comment- Returns:
this
builder for use in a chained invocation
-
setSoftware
Initializes the optional valuesoftware
to software.- Parameters:
software
- The value for software- Returns:
this
builder for chained invocation
-
setSoftware
Initializes the optional valuesoftware
to software.- Parameters:
software
- The value for software- Returns:
this
builder for use in a chained invocation
-
build
Builds a newNTInfo
.- Returns:
- An immutable instance of NTInfo
- Throws:
IllegalStateException
- if any required attributes are missing
-