Package pl.poznan.put.structure.formats
Class ImmutableDefaultDotBracket.Builder
- java.lang.Object
-
- pl.poznan.put.structure.formats.ImmutableDefaultDotBracket.Builder
-
- Enclosing class:
- ImmutableDefaultDotBracket
@NotThreadSafe public static final class ImmutableDefaultDotBracket.Builder extends Object
Builds instances of typeImmutableDefaultDotBracket. 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 ImmutableDefaultDotBracket.BuilderaddAllStrands(Iterable<? extends Strand> elements)Adds elements tostrandslist.ImmutableDefaultDotBracket.BuilderaddStrands(Strand element)Adds one element tostrandslist.ImmutableDefaultDotBracket.BuilderaddStrands(Strand... elements)Adds elements tostrandslist.ImmutableDefaultDotBracketbuild()Builds a newImmutableDefaultDotBracket.ImmutableDefaultDotBracket.Builderfrom(DefaultDotBracket instance)Fill a builder with attribute values from the providedpl.poznan.put.structure.formats.DefaultDotBracketinstance.ImmutableDefaultDotBracket.Builderfrom(DotBracket instance)Fill a builder with attribute values from the providedpl.poznan.put.structure.formats.DotBracketinstance.ImmutableDefaultDotBracket.Buildersequence(String sequence)Initializes the value for thesequenceattribute.ImmutableDefaultDotBracket.Builderstrands(Iterable<? extends Strand> elements)Sets or replaces all elements forstrandslist.ImmutableDefaultDotBracket.Builderstructure(String structure)Initializes the value for thestructureattribute.
-
-
-
Method Detail
-
from
public final ImmutableDefaultDotBracket.Builder from(DefaultDotBracket instance)
Fill a builder with attribute values from the providedpl.poznan.put.structure.formats.DefaultDotBracketinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
public final ImmutableDefaultDotBracket.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
-
addStrands
public final ImmutableDefaultDotBracket.Builder addStrands(Strand element)
Adds one element tostrandslist.- Parameters:
element- A strands element- Returns:
thisbuilder for use in a chained invocation
-
addStrands
public final ImmutableDefaultDotBracket.Builder addStrands(Strand... elements)
Adds elements tostrandslist.- Parameters:
elements- An array of strands elements- Returns:
thisbuilder for use in a chained invocation
-
strands
public final ImmutableDefaultDotBracket.Builder strands(Iterable<? extends Strand> elements)
Sets or replaces all elements forstrandslist.- Parameters:
elements- An iterable of strands elements- Returns:
thisbuilder for use in a chained invocation
-
addAllStrands
public final ImmutableDefaultDotBracket.Builder addAllStrands(Iterable<? extends Strand> elements)
Adds elements tostrandslist.- Parameters:
elements- An iterable of strands elements- Returns:
thisbuilder for use in a chained invocation
-
sequence
public final ImmutableDefaultDotBracket.Builder sequence(String sequence)
Initializes the value for thesequenceattribute.- Parameters:
sequence- The value for sequence- Returns:
thisbuilder for use in a chained invocation
-
structure
public final ImmutableDefaultDotBracket.Builder structure(String structure)
Initializes the value for thestructureattribute.- Parameters:
structure- The value for structure- Returns:
thisbuilder for use in a chained invocation
-
build
public ImmutableDefaultDotBracket build()
Builds a newImmutableDefaultDotBracket.- Returns:
- An immutable instance of DefaultDotBracket
- Throws:
IllegalStateException- if any required attributes are missing
-
-