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.Builderfrom(NTInfoType instance) Fill a builder with attribute values from the providedNTInfoTypeinstance.final NTInfo.BuildersetComment(NTLongString comment) Initializes the optional valuecommentto comment.final NTInfo.BuildersetComment(Optional<? extends NTLongString> comment) Initializes the optional valuecommentto comment.final NTInfo.BuildersetCopyright(NTShortString copyright) Initializes the optional valuecopyrightto copyright.final NTInfo.BuildersetCopyright(Optional<? extends NTShortString> copyright) Initializes the optional valuecopyrightto copyright.final NTInfo.BuildersetCreationDate(NTShortString creationDate) Initializes the optional valuecreationDateto creationDate.final NTInfo.BuildersetCreationDate(Optional<? extends NTShortString> creationDate) Initializes the optional valuecreationDateto creationDate.final NTInfo.BuildersetEngineers(NTShortString engineers) Initializes the optional valueengineersto engineers.final NTInfo.BuildersetEngineers(Optional<? extends NTShortString> engineers) Initializes the optional valueengineersto engineers.final NTInfo.BuildersetName(NTShortString name) Initializes the value for thenameattribute.final NTInfo.BuildersetProduct(NTShortString product) Initializes the optional valueproductto product.final NTInfo.BuildersetProduct(Optional<? extends NTShortString> product) Initializes the optional valueproductto product.final NTInfo.BuildersetRom(NTShortString rom) Initializes the optional valueromto rom.final NTInfo.BuildersetRom(Optional<? extends NTShortString> rom) Initializes the optional valueromto rom.final NTInfo.BuildersetRomRevision(NTVersion romRevision) Initializes the optional valueromRevisionto romRevision.final NTInfo.BuildersetRomRevision(Optional<? extends NTVersion> romRevision) Initializes the optional valueromRevisionto romRevision.final NTInfo.BuildersetSoftware(NTShortString software) Initializes the optional valuesoftwareto software.final NTInfo.BuildersetSoftware(Optional<? extends NTShortString> software) Initializes the optional valuesoftwareto software.final NTInfo.BuildersetSoundEngine(NTShortString soundEngine) Initializes the value for thesoundEngineattribute.final NTInfo.BuildersetVersion(NTVersion version) Initializes the value for theversionattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedNTInfoTypeinstance. 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:
thisbuilder for use in a chained invocation
-
setVersion
Initializes the value for theversionattribute.- Parameters:
version- The value for version- Returns:
thisbuilder for use in a chained invocation
-
setSoundEngine
Initializes the value for thesoundEngineattribute.If not set, this attribute will have a default value as returned by the initializer of
soundEngine.- Parameters:
soundEngine- The value for soundEngine- Returns:
thisbuilder for use in a chained invocation
-
setName
Initializes the value for thenameattribute.- Parameters:
name- The value for name- Returns:
thisbuilder for use in a chained invocation
-
setRom
Initializes the optional valueromto rom.- Parameters:
rom- The value for rom- Returns:
thisbuilder for chained invocation
-
setRom
Initializes the optional valueromto rom.- Parameters:
rom- The value for rom- Returns:
thisbuilder for use in a chained invocation
-
setRomRevision
Initializes the optional valueromRevisionto romRevision.- Parameters:
romRevision- The value for romRevision- Returns:
thisbuilder for chained invocation
-
setRomRevision
Initializes the optional valueromRevisionto romRevision.- Parameters:
romRevision- The value for romRevision- Returns:
thisbuilder for use in a chained invocation
-
setCreationDate
Initializes the optional valuecreationDateto creationDate.- Parameters:
creationDate- The value for creationDate- Returns:
thisbuilder for chained invocation
-
setCreationDate
Initializes the optional valuecreationDateto creationDate.- Parameters:
creationDate- The value for creationDate- Returns:
thisbuilder for use in a chained invocation
-
setEngineers
Initializes the optional valueengineersto engineers.- Parameters:
engineers- The value for engineers- Returns:
thisbuilder for chained invocation
-
setEngineers
Initializes the optional valueengineersto engineers.- Parameters:
engineers- The value for engineers- Returns:
thisbuilder for use in a chained invocation
-
setProduct
Initializes the optional valueproductto product.- Parameters:
product- The value for product- Returns:
thisbuilder for chained invocation
-
setProduct
Initializes the optional valueproductto product.- Parameters:
product- The value for product- Returns:
thisbuilder for use in a chained invocation
-
setCopyright
Initializes the optional valuecopyrightto copyright.- Parameters:
copyright- The value for copyright- Returns:
thisbuilder for chained invocation
-
setCopyright
Initializes the optional valuecopyrightto copyright.- Parameters:
copyright- The value for copyright- Returns:
thisbuilder for use in a chained invocation
-
setComment
Initializes the optional valuecommentto comment.- Parameters:
comment- The value for comment- Returns:
thisbuilder for chained invocation
-
setComment
Initializes the optional valuecommentto comment.- Parameters:
comment- The value for comment- Returns:
thisbuilder for use in a chained invocation
-
setSoftware
Initializes the optional valuesoftwareto software.- Parameters:
software- The value for software- Returns:
thisbuilder for chained invocation
-
setSoftware
Initializes the optional valuesoftwareto software.- Parameters:
software- The value for software- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newNTInfo.- Returns:
- An immutable instance of NTInfo
- Throws:
IllegalStateException- if any required attributes are missing
-