Package pl.poznan.put.structure.formats
Class ImmutableCombinedStrand.Builder
java.lang.Object
pl.poznan.put.structure.formats.ImmutableCombinedStrand.Builder
- Enclosing class:
- ImmutableCombinedStrand
Builds instances of type
ImmutableCombinedStrand
.
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 TypeMethodDescriptionaddAllInputStrands
(Iterable<? extends Strand> elements) Adds elements toinputStrands
list.addInputStrands
(Strand element) Adds one element toinputStrands
list.addInputStrands
(Strand... elements) Adds elements toinputStrands
list.build()
Builds a newImmutableCombinedStrand
.from
(AbstractCombinedStrand instance) Fill a builder with attribute values from the providedpl.poznan.put.structure.formats.AbstractCombinedStrand
instance.from
(CombinedStrand instance) Fill a builder with attribute values from the providedpl.poznan.put.structure.formats.CombinedStrand
instance.inputStrands
(Iterable<? extends Strand> elements) Sets or replaces all elements forinputStrands
list.
-
Method Details
-
from
Fill a builder with attribute values from the providedpl.poznan.put.structure.formats.AbstractCombinedStrand
instance.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
from
Fill a builder with attribute values from the providedpl.poznan.put.structure.formats.CombinedStrand
instance.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
addInputStrands
Adds one element toinputStrands
list.- Parameters:
element
- A inputStrands element- Returns:
this
builder for use in a chained invocation
-
addInputStrands
Adds elements toinputStrands
list.- Parameters:
elements
- An array of inputStrands elements- Returns:
this
builder for use in a chained invocation
-
inputStrands
Sets or replaces all elements forinputStrands
list.- Parameters:
elements
- An iterable of inputStrands elements- Returns:
this
builder for use in a chained invocation
-
addAllInputStrands
public final ImmutableCombinedStrand.Builder addAllInputStrands(Iterable<? extends Strand> elements) Adds elements toinputStrands
list.- Parameters:
elements
- An iterable of inputStrands elements- Returns:
this
builder for use in a chained invocation
-
build
Builds a newImmutableCombinedStrand
.- Returns:
- An immutable instance of CombinedStrand
- Throws:
IllegalStateException
- if any required attributes are missing
-