Package com.io7m.jnoisetype.api
Class NTInfo.Builder
java.lang.Object
com.io7m.jnoisetype.api.NTInfo.Builder
- Enclosing class:
- NTInfo
public static final class NTInfo.Builder
extends java.lang.Object
-
Method Summary
Modifier and Type Method Description NTInfobuild()Builds a newNTInfo.NTInfo.Builderfrom(NTInfoType instance)Fill a builder with attribute values from the providedNTInfoTypeinstance.NTInfo.BuildersetComment(NTLongString comment)Initializes the optional valuecommentto comment.NTInfo.BuildersetComment(java.util.Optional<? extends NTLongString> comment)Initializes the optional valuecommentto comment.NTInfo.BuildersetCopyright(NTShortString copyright)Initializes the optional valuecopyrightto copyright.NTInfo.BuildersetCopyright(java.util.Optional<? extends NTShortString> copyright)Initializes the optional valuecopyrightto copyright.NTInfo.BuildersetCreationDate(NTShortString creationDate)Initializes the optional valuecreationDateto creationDate.NTInfo.BuildersetCreationDate(java.util.Optional<? extends NTShortString> creationDate)Initializes the optional valuecreationDateto creationDate.NTInfo.BuildersetEngineers(NTShortString engineers)Initializes the optional valueengineersto engineers.NTInfo.BuildersetEngineers(java.util.Optional<? extends NTShortString> engineers)Initializes the optional valueengineersto engineers.NTInfo.BuildersetName(NTShortString name)Initializes the value for thenameattribute.NTInfo.BuildersetProduct(NTShortString product)Initializes the optional valueproductto product.NTInfo.BuildersetProduct(java.util.Optional<? extends NTShortString> product)Initializes the optional valueproductto product.NTInfo.BuildersetRom(NTShortString rom)Initializes the optional valueromto rom.NTInfo.BuildersetRom(java.util.Optional<? extends NTShortString> rom)Initializes the optional valueromto rom.NTInfo.BuildersetRomRevision(NTVersion romRevision)Initializes the optional valueromRevisionto romRevision.NTInfo.BuildersetRomRevision(java.util.Optional<? extends NTVersion> romRevision)Initializes the optional valueromRevisionto romRevision.NTInfo.BuildersetSoftware(NTShortString software)Initializes the optional valuesoftwareto software.NTInfo.BuildersetSoftware(java.util.Optional<? extends NTShortString> software)Initializes the optional valuesoftwareto software.NTInfo.BuildersetSoundEngine(NTShortString soundEngine)Initializes the value for thesoundEngineattribute.NTInfo.BuildersetVersion(NTVersion version)Initializes the value for theversionattribute.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
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
public final NTInfo.Builder setCreationDate(java.util.Optional<? extends NTShortString> creationDate)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:
java.lang.IllegalStateException- if any required attributes are missing
-