Package pl.poznan.put.structure.formats
Class ImmutableCombinedStrand.Builder
- java.lang.Object
-
- pl.poznan.put.structure.formats.ImmutableCombinedStrand.Builder
-
- Enclosing class:
- ImmutableCombinedStrand
@NotThreadSafe public static final class ImmutableCombinedStrand.Builder extends Object
Builds instances of typeImmutableCombinedStrand. Initialize attributes and then invoke thebuild()method to create an immutable instance.Builderis not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ImmutableCombinedStrand.BuilderaddAllInputStrands(Iterable<? extends Strand> elements)Adds elements toinputStrandslist.ImmutableCombinedStrand.BuilderaddInputStrands(Strand element)Adds one element toinputStrandslist.ImmutableCombinedStrand.BuilderaddInputStrands(Strand... elements)Adds elements toinputStrandslist.ImmutableCombinedStrandbuild()Builds a newImmutableCombinedStrand.ImmutableCombinedStrand.Builderfrom(AbstractCombinedStrand instance)Fill a builder with attribute values from the providedpl.poznan.put.structure.formats.AbstractCombinedStrandinstance.ImmutableCombinedStrand.Builderfrom(CombinedStrand instance)Fill a builder with attribute values from the providedpl.poznan.put.structure.formats.CombinedStrandinstance.ImmutableCombinedStrand.BuilderinputStrands(Iterable<? extends Strand> elements)Sets or replaces all elements forinputStrandslist.
-
-
-
Method Detail
-
from
public final ImmutableCombinedStrand.Builder from(AbstractCombinedStrand instance)
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
public final ImmutableCombinedStrand.Builder from(CombinedStrand instance)
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
public final ImmutableCombinedStrand.Builder addInputStrands(Strand element)
Adds one element toinputStrandslist.- Parameters:
element- A inputStrands element- Returns:
thisbuilder for use in a chained invocation
-
addInputStrands
public final ImmutableCombinedStrand.Builder addInputStrands(Strand... elements)
Adds elements toinputStrandslist.- Parameters:
elements- An array of inputStrands elements- Returns:
thisbuilder for use in a chained invocation
-
inputStrands
public final ImmutableCombinedStrand.Builder inputStrands(Iterable<? extends Strand> elements)
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
public ImmutableCombinedStrand build()
Builds a newImmutableCombinedStrand.- Returns:
- An immutable instance of CombinedStrand
- Throws:
IllegalStateException- if any required attributes are missing
-
-