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 Summary
Modifier and Type Method Description FormatXML1RuntimeChildTags.Builder
addAllTags(java.lang.Iterable<java.lang.String> elements)
Adds elements totags
set.FormatXML1RuntimeChildTags.Builder
addTags(java.lang.String element)
Adds one element totags
set.FormatXML1RuntimeChildTags.Builder
addTags(java.lang.String... elements)
Adds elements totags
set.FormatXML1RuntimeChildTags
build()
Builds a newFormatXML1RuntimeChildTags
.FormatXML1RuntimeChildTags.Builder
from(FormatXML1RuntimeChildType.FormatXML1RuntimeChildTagsType instance)
Fill a builder with attribute values from the providedFormatXML1RuntimeChildTagsType
instance.FormatXML1RuntimeChildTags.Builder
setTags(java.lang.Iterable<java.lang.String> elements)
Sets or replaces all elements fortags
set.
-
Method Details
-
from
public final FormatXML1RuntimeChildTags.Builder from(FormatXML1RuntimeChildType.FormatXML1RuntimeChildTagsType instance)Fill a builder with attribute values from the providedFormatXML1RuntimeChildTagsType
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
Adds one element totags
set.- Parameters:
element
- A tags element- Returns:
this
builder for use in a chained invocation
-
addTags
Adds elements totags
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 fortags
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 totags
set.- Parameters:
elements
- An iterable of tags elements- Returns:
this
builder for use in a chained invocation
-
build
Builds a newFormatXML1RuntimeChildTags
.- Returns:
- An immutable instance of FormatXML1RuntimeChildTags
- Throws:
java.lang.IllegalStateException
- if any required attributes are missing
-