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 toinputStrandslist.addInputStrands(Strand element) Adds one element toinputStrandslist.addInputStrands(Strand... elements) Adds elements toinputStrandslist.build()Builds a newImmutableCombinedStrand.from(AbstractCombinedStrand instance) Fill a builder with attribute values from the providedpl.poznan.put.structure.formats.AbstractCombinedStrandinstance.from(CombinedStrand instance) Fill a builder with attribute values from the providedpl.poznan.put.structure.formats.CombinedStrandinstance.inputStrands(Iterable<? extends Strand> elements) Sets or replaces all elements forinputStrandslist.
-
Method Details
-
from
Fill a builder with attribute values from the providedpl.poznan.put.structure.formats.AbstractCombinedStrandinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
Fill a builder with attribute values from the providedpl.poznan.put.structure.formats.CombinedStrandinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
addInputStrands
Adds one element toinputStrandslist.- Parameters:
element- A inputStrands element- Returns:
thisbuilder for use in a chained invocation
-
addInputStrands
Adds elements toinputStrandslist.- Parameters:
elements- An array of inputStrands elements- Returns:
thisbuilder for use in a chained invocation
-
inputStrands
Sets or replaces all elements forinputStrandslist.- Parameters:
elements- An iterable of inputStrands elements- Returns:
thisbuilder for use in a chained invocation
-
addAllInputStrands
public final ImmutableCombinedStrand.Builder addAllInputStrands(Iterable<? extends Strand> elements) Adds elements toinputStrandslist.- Parameters:
elements- An iterable of inputStrands elements- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newImmutableCombinedStrand.- Returns:
- An immutable instance of CombinedStrand
- Throws:
IllegalStateException- if any required attributes are missing
-