Package com.io7m.waxmill.xml.vm.v1
Class WXM1OpenOptions.Builder
java.lang.Object
com.io7m.waxmill.xml.vm.v1.WXM1OpenOptions.Builder
- Enclosing class:
- WXM1OpenOptions
public static final class WXM1OpenOptions.Builder
extends java.lang.Object
Builds instances of type
WXM1OpenOptions.
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 WXM1OpenOptions.BuilderaddAllOpenOptions(java.lang.Iterable<? extends WXMOpenOption> elements)Adds elements toopenOptionslist.WXM1OpenOptions.BuilderaddOpenOptions(WXMOpenOption element)Adds one element toopenOptionslist.WXM1OpenOptions.BuilderaddOpenOptions(WXMOpenOption... elements)Adds elements toopenOptionslist.WXM1OpenOptionsbuild()Builds a newWXM1OpenOptions.WXM1OpenOptions.Builderfrom(WXM1OpenOptionsType instance)Fill a builder with attribute values from the providedWXM1OpenOptionsTypeinstance.WXM1OpenOptions.BuildersetOpenOptions(java.lang.Iterable<? extends WXMOpenOption> elements)Sets or replaces all elements foropenOptionslist.
-
Method Details
-
from
Fill a builder with attribute values from the providedWXM1OpenOptionsTypeinstance. 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:
thisbuilder for use in a chained invocation
-
addOpenOptions
Adds one element toopenOptionslist.- Parameters:
element- A openOptions element- Returns:
thisbuilder for use in a chained invocation
-
addOpenOptions
Adds elements toopenOptionslist.- Parameters:
elements- An array of openOptions elements- Returns:
thisbuilder for use in a chained invocation
-
setOpenOptions
public final WXM1OpenOptions.Builder setOpenOptions(java.lang.Iterable<? extends WXMOpenOption> elements)Sets or replaces all elements foropenOptionslist.- Parameters:
elements- An iterable of openOptions elements- Returns:
thisbuilder for use in a chained invocation
-
addAllOpenOptions
public final WXM1OpenOptions.Builder addAllOpenOptions(java.lang.Iterable<? extends WXMOpenOption> elements)Adds elements toopenOptionslist.- Parameters:
elements- An iterable of openOptions elements- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newWXM1OpenOptions.- Returns:
- An immutable instance of WXM1OpenOptions
- Throws:
java.lang.IllegalStateException- if any required attributes are missing
-