Package pl.poznan.put.structure.formats
Class ImmutableDefaultStrand.Builder
- java.lang.Object
-
- pl.poznan.put.structure.formats.ImmutableDefaultStrand.Builder
-
- Enclosing class:
- ImmutableDefaultStrand
@NotThreadSafe public static final class ImmutableDefaultStrand.Builder extends Object
Builds instances of typeImmutableDefaultStrand. 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 ImmutableDefaultStrand.BuilderaddAllCombineStrands(Iterable<? extends DotBracket> elements)Adds elements tocombineStrandslist.ImmutableDefaultStrand.BuilderaddAllSymbols(Iterable<? extends DotBracketSymbol> elements)Adds elements tosymbolslist.ImmutableDefaultStrand.BuilderaddCombineStrands(DotBracket element)Adds one element tocombineStrandslist.ImmutableDefaultStrand.BuilderaddCombineStrands(DotBracket... elements)Adds elements tocombineStrandslist.ImmutableDefaultStrand.BuilderaddSymbols(DotBracketSymbol element)Adds one element tosymbolslist.ImmutableDefaultStrand.BuilderaddSymbols(DotBracketSymbol... elements)Adds elements tosymbolslist.ImmutableDefaultStrandbuild()Builds a newImmutableDefaultStrand.ImmutableDefaultStrand.BuildercombineStrands(Iterable<? extends DotBracket> elements)Sets or replaces all elements forcombineStrandslist.ImmutableDefaultStrand.Builderfrom(DefaultStrand instance)Fill a builder with attribute values from the providedpl.poznan.put.structure.formats.DefaultStrandinstance.ImmutableDefaultStrand.Builderfrom(DotBracket instance)Fill a builder with attribute values from the providedpl.poznan.put.structure.formats.DotBracketinstance.ImmutableDefaultStrand.Builderfrom(Strand instance)Fill a builder with attribute values from the providedpl.poznan.put.structure.formats.Strandinstance.ImmutableDefaultStrand.Buildername(String name)Initializes the value for thenameattribute.ImmutableDefaultStrand.Buildersymbols(Iterable<? extends DotBracketSymbol> elements)Sets or replaces all elements forsymbolslist.
-
-
-
Method Detail
-
from
public final ImmutableDefaultStrand.Builder from(DefaultStrand instance)
Fill a builder with attribute values from the providedpl.poznan.put.structure.formats.DefaultStrandinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
public final ImmutableDefaultStrand.Builder from(DotBracket instance)
Fill a builder with attribute values from the providedpl.poznan.put.structure.formats.DotBracketinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
public final ImmutableDefaultStrand.Builder from(Strand instance)
Fill a builder with attribute values from the providedpl.poznan.put.structure.formats.Strandinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
addCombineStrands
public final ImmutableDefaultStrand.Builder addCombineStrands(DotBracket element)
Adds one element tocombineStrandslist.- Parameters:
element- A combineStrands element- Returns:
thisbuilder for use in a chained invocation
-
addCombineStrands
public final ImmutableDefaultStrand.Builder addCombineStrands(DotBracket... elements)
Adds elements tocombineStrandslist.- Parameters:
elements- An array of combineStrands elements- Returns:
thisbuilder for use in a chained invocation
-
combineStrands
public final ImmutableDefaultStrand.Builder combineStrands(Iterable<? extends DotBracket> elements)
Sets or replaces all elements forcombineStrandslist.- Parameters:
elements- An iterable of combineStrands elements- Returns:
thisbuilder for use in a chained invocation
-
addAllCombineStrands
public final ImmutableDefaultStrand.Builder addAllCombineStrands(Iterable<? extends DotBracket> elements)
Adds elements tocombineStrandslist.- Parameters:
elements- An iterable of combineStrands elements- Returns:
thisbuilder for use in a chained invocation
-
name
public final ImmutableDefaultStrand.Builder name(String name)
Initializes the value for thenameattribute.- Parameters:
name- The value for name- Returns:
thisbuilder for use in a chained invocation
-
addSymbols
public final ImmutableDefaultStrand.Builder addSymbols(DotBracketSymbol element)
Adds one element tosymbolslist.- Parameters:
element- A symbols element- Returns:
thisbuilder for use in a chained invocation
-
addSymbols
public final ImmutableDefaultStrand.Builder addSymbols(DotBracketSymbol... elements)
Adds elements tosymbolslist.- Parameters:
elements- An array of symbols elements- Returns:
thisbuilder for use in a chained invocation
-
symbols
public final ImmutableDefaultStrand.Builder symbols(Iterable<? extends DotBracketSymbol> elements)
Sets or replaces all elements forsymbolslist.- Parameters:
elements- An iterable of symbols elements- Returns:
thisbuilder for use in a chained invocation
-
addAllSymbols
public final ImmutableDefaultStrand.Builder addAllSymbols(Iterable<? extends DotBracketSymbol> elements)
Adds elements tosymbolslist.- Parameters:
elements- An iterable of symbols elements- Returns:
thisbuilder for use in a chained invocation
-
build
public ImmutableDefaultStrand build()
Builds a newImmutableDefaultStrand.- Returns:
- An immutable instance of DefaultStrand
- Throws:
IllegalStateException- if any required attributes are missing
-
-