Class FormatXML1RuntimeChildTags.Builder

java.lang.Object
com.io7m.coffeepick.runtime.format.xml.FormatXML1RuntimeChildTags.Builder
Enclosing class:
FormatXML1RuntimeChildTags

public static final class FormatXML1RuntimeChildTags.Builder
extends java.lang.Object
Builds instances of type FormatXML1RuntimeChildTags. 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 Details

    • from

      Fill a builder with attribute values from the provided FormatXML1RuntimeChildTagsType instance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values. Collection elements and entries will be added, not replaced.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • addTags

      public final FormatXML1RuntimeChildTags.Builder addTags​(java.lang.String element)
      Adds one element to tags set.
      Parameters:
      element - A tags element
      Returns:
      this builder for use in a chained invocation
    • addTags

      public final FormatXML1RuntimeChildTags.Builder addTags​(java.lang.String... elements)
      Adds elements to tags set.
      Parameters:
      elements - An array of tags elements
      Returns:
      this builder for use in a chained invocation
    • setTags

      public final FormatXML1RuntimeChildTags.Builder setTags​(java.lang.Iterable<java.lang.String> elements)
      Sets or replaces all elements for tags set.
      Parameters:
      elements - An iterable of tags elements
      Returns:
      this builder for use in a chained invocation
    • addAllTags

      public final FormatXML1RuntimeChildTags.Builder addAllTags​(java.lang.Iterable<java.lang.String> elements)
      Adds elements to tags set.
      Parameters:
      elements - An iterable of tags elements
      Returns:
      this builder for use in a chained invocation
    • build

      Returns:
      An immutable instance of FormatXML1RuntimeChildTags
      Throws:
      java.lang.IllegalStateException - if any required attributes are missing