Package pl.poznan.put.structure.formats
Class ImmutableDefaultStrand.Builder
java.lang.Object
pl.poznan.put.structure.formats.ImmutableDefaultStrand.Builder
- Enclosing class:
- ImmutableDefaultStrand
Builds instances of type
ImmutableDefaultStrand.
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 TypeMethodDescriptionaddAllCombineStrands(Iterable<? extends DotBracket> elements) Adds elements tocombineStrandslist.addAllSymbols(Iterable<? extends DotBracketSymbol> elements) Adds elements tosymbolslist.addCombineStrands(DotBracket element) Adds one element tocombineStrandslist.addCombineStrands(DotBracket... elements) Adds elements tocombineStrandslist.addSymbols(DotBracketSymbol element) Adds one element tosymbolslist.addSymbols(DotBracketSymbol... elements) Adds elements tosymbolslist.build()Builds a newImmutableDefaultStrand.combineStrands(Iterable<? extends DotBracket> elements) Sets or replaces all elements forcombineStrandslist.from(DefaultStrand instance) Fill a builder with attribute values from the providedpl.poznan.put.structure.formats.DefaultStrandinstance.from(DotBracket instance) Fill a builder with attribute values from the providedpl.poznan.put.structure.formats.DotBracketinstance.Fill a builder with attribute values from the providedpl.poznan.put.structure.formats.Strandinstance.Initializes the value for thenameattribute.symbols(Iterable<? extends DotBracketSymbol> elements) Sets or replaces all elements forsymbolslist.
-
Method Details
-
from
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
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
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
Adds one element tocombineStrandslist.- Parameters:
element- A combineStrands element- Returns:
thisbuilder for use in a chained invocation
-
addCombineStrands
Adds elements tocombineStrandslist.- Parameters:
elements- An array of combineStrands elements- Returns:
thisbuilder for use in a chained invocation
-
combineStrands
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
Initializes the value for thenameattribute.- Parameters:
name- The value for name- Returns:
thisbuilder for use in a chained invocation
-
addSymbols
Adds one element tosymbolslist.- Parameters:
element- A symbols element- Returns:
thisbuilder for use in a chained invocation
-
addSymbols
Adds elements tosymbolslist.- Parameters:
elements- An array of symbols elements- Returns:
thisbuilder for use in a chained invocation
-
symbols
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
Builds a newImmutableDefaultStrand.- Returns:
- An immutable instance of DefaultStrand
- Throws:
IllegalStateException- if any required attributes are missing
-