Class NTInfo.Builder

  • Enclosing class:
    NTInfo

    public static final class NTInfo.Builder
    extends java.lang.Object
    Builds instances of type NTInfo. Initialize attributes and then invoke the build() method to create an immutable instance.

    Builder is not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.

    • Method Detail

      • from

        public final NTInfo.Builder from​(NTInfoType instance)
        Fill a builder with attribute values from the provided NTInfoType 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

        public final NTInfo.Builder setVersion​(NTVersion version)
        Initializes the value for the version attribute.
        Parameters:
        version - The value for version
        Returns:
        this builder for use in a chained invocation
      • setSoundEngine

        public final NTInfo.Builder setSoundEngine​(NTShortString soundEngine)
        Initializes the value for the soundEngine 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

        public final NTInfo.Builder setName​(NTShortString name)
        Initializes the value for the name attribute.
        Parameters:
        name - The value for name
        Returns:
        this builder for use in a chained invocation
      • setRom

        public final NTInfo.Builder setRom​(NTShortString rom)
        Initializes the optional value rom to rom.
        Parameters:
        rom - The value for rom
        Returns:
        this builder for chained invocation
      • setRom

        public final NTInfo.Builder setRom​(java.util.Optional<? extends NTShortString> rom)
        Initializes the optional value rom to rom.
        Parameters:
        rom - The value for rom
        Returns:
        this builder for use in a chained invocation
      • setRomRevision

        public final NTInfo.Builder setRomRevision​(NTVersion romRevision)
        Initializes the optional value romRevision to romRevision.
        Parameters:
        romRevision - The value for romRevision
        Returns:
        this builder for chained invocation
      • setRomRevision

        public final NTInfo.Builder setRomRevision​(java.util.Optional<? extends NTVersion> romRevision)
        Initializes the optional value romRevision to romRevision.
        Parameters:
        romRevision - The value for romRevision
        Returns:
        this builder for use in a chained invocation
      • setCreationDate

        public final NTInfo.Builder setCreationDate​(NTShortString creationDate)
        Initializes the optional value creationDate to creationDate.
        Parameters:
        creationDate - The value for creationDate
        Returns:
        this builder for chained invocation
      • setCreationDate

        public final NTInfo.Builder setCreationDate​(java.util.Optional<? extends NTShortString> creationDate)
        Initializes the optional value creationDate to creationDate.
        Parameters:
        creationDate - The value for creationDate
        Returns:
        this builder for use in a chained invocation
      • setEngineers

        public final NTInfo.Builder setEngineers​(NTShortString engineers)
        Initializes the optional value engineers to engineers.
        Parameters:
        engineers - The value for engineers
        Returns:
        this builder for chained invocation
      • setEngineers

        public final NTInfo.Builder setEngineers​(java.util.Optional<? extends NTShortString> engineers)
        Initializes the optional value engineers to engineers.
        Parameters:
        engineers - The value for engineers
        Returns:
        this builder for use in a chained invocation
      • setProduct

        public final NTInfo.Builder setProduct​(NTShortString product)
        Initializes the optional value product to product.
        Parameters:
        product - The value for product
        Returns:
        this builder for chained invocation
      • setProduct

        public final NTInfo.Builder setProduct​(java.util.Optional<? extends NTShortString> product)
        Initializes the optional value product to product.
        Parameters:
        product - The value for product
        Returns:
        this builder for use in a chained invocation
      • setCopyright

        public final NTInfo.Builder setCopyright​(NTShortString copyright)
        Initializes the optional value copyright to copyright.
        Parameters:
        copyright - The value for copyright
        Returns:
        this builder for chained invocation
      • setCopyright

        public final NTInfo.Builder setCopyright​(java.util.Optional<? extends NTShortString> copyright)
        Initializes the optional value copyright to copyright.
        Parameters:
        copyright - The value for copyright
        Returns:
        this builder for use in a chained invocation
      • setComment

        public final NTInfo.Builder setComment​(NTLongString comment)
        Initializes the optional value comment to comment.
        Parameters:
        comment - The value for comment
        Returns:
        this builder for chained invocation
      • setComment

        public final NTInfo.Builder setComment​(java.util.Optional<? extends NTLongString> comment)
        Initializes the optional value comment to comment.
        Parameters:
        comment - The value for comment
        Returns:
        this builder for use in a chained invocation
      • setSoftware

        public final NTInfo.Builder setSoftware​(NTShortString software)
        Initializes the optional value software to software.
        Parameters:
        software - The value for software
        Returns:
        this builder for chained invocation
      • setSoftware

        public final NTInfo.Builder setSoftware​(java.util.Optional<? extends NTShortString> software)
        Initializes the optional value software to software.
        Parameters:
        software - The value for software
        Returns:
        this builder for use in a chained invocation
      • build

        public NTInfo build()
        Builds a new NTInfo.
        Returns:
        An immutable instance of NTInfo
        Throws:
        java.lang.IllegalStateException - if any required attributes are missing