Package com.io7m.waxmill.realize
Class WXMRealizationInstructions.Builder
java.lang.Object
com.io7m.waxmill.realize.WXMRealizationInstructions.Builder
- Enclosing class:
- WXMRealizationInstructions
public static final class WXMRealizationInstructions.Builder
extends java.lang.Object
Builds instances of type
WXMRealizationInstructions.
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 WXMRealizationInstructions.BuilderaddAllSteps(java.lang.Iterable<? extends WXMRealizationStepType> elements)Adds elements tostepslist.WXMRealizationInstructions.BuilderaddSteps(WXMRealizationStepType element)Adds one element tostepslist.WXMRealizationInstructions.BuilderaddSteps(WXMRealizationStepType... elements)Adds elements tostepslist.WXMRealizationInstructionsbuild()Builds a newWXMRealizationInstructions.WXMRealizationInstructions.Builderfrom(WXMRealizationInstructionsType instance)Fill a builder with attribute values from the providedWXMRealizationInstructionsTypeinstance.WXMRealizationInstructions.BuildersetSteps(java.lang.Iterable<? extends WXMRealizationStepType> elements)Sets or replaces all elements forstepslist.
-
Method Details
-
from
Fill a builder with attribute values from the providedWXMRealizationInstructionsTypeinstance. 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
-
addSteps
Adds one element tostepslist.- Parameters:
element- A steps element- Returns:
thisbuilder for use in a chained invocation
-
addSteps
Adds elements tostepslist.- Parameters:
elements- An array of steps elements- Returns:
thisbuilder for use in a chained invocation
-
setSteps
public final WXMRealizationInstructions.Builder setSteps(java.lang.Iterable<? extends WXMRealizationStepType> elements)Sets or replaces all elements forstepslist.- Parameters:
elements- An iterable of steps elements- Returns:
thisbuilder for use in a chained invocation
-
addAllSteps
public final WXMRealizationInstructions.Builder addAllSteps(java.lang.Iterable<? extends WXMRealizationStepType> elements)Adds elements tostepslist.- Parameters:
elements- An iterable of steps elements- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newWXMRealizationInstructions.- Returns:
- An immutable instance of WXMRealizationInstructions
- Throws:
java.lang.IllegalStateException- if any required attributes are missing
-