Package pl.poznan.put.structure.formats
Class ImmutableCombinedStrandFromPdb.Builder
java.lang.Object
pl.poznan.put.structure.formats.ImmutableCombinedStrandFromPdb.Builder
- Enclosing class:
- ImmutableCombinedStrandFromPdb
Builds instances of type
ImmutableCombinedStrandFromPdb
.
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 toinputStrands
list.addInputStrands
(Strand element) Adds one element toinputStrands
list.addInputStrands
(Strand... elements) Adds elements toinputStrands
list.build()
Builds a newImmutableCombinedStrandFromPdb
.from
(AbstractCombinedStrand instance) Fill a builder with attribute values from the providedpl.poznan.put.structure.formats.AbstractCombinedStrand
instance.from
(CombinedStrandFromPdb instance) Fill a builder with attribute values from the providedpl.poznan.put.structure.formats.CombinedStrandFromPdb
instance.inputStrands
(Iterable<? extends Strand> elements) Sets or replaces all elements forinputStrands
list.inputSymbolToResidue
(Map<? extends DotBracketSymbol, ? extends PdbResidueIdentifier> entries) Sets or replaces all mappings from the specified map as entries for theinputSymbolToResidue
map.putAllInputSymbolToResidue
(Map<? extends DotBracketSymbol, ? extends PdbResidueIdentifier> entries) Put all mappings from the specified map as entries toinputSymbolToResidue
map.putInputSymbolToResidue
(Map.Entry<? extends DotBracketSymbol, ? extends PdbResidueIdentifier> entry) Put one entry to theinputSymbolToResidue
map.Put one entry to theinputSymbolToResidue
map.
-
Method Details
-
from
Fill a builder with attribute values from the providedpl.poznan.put.structure.formats.CombinedStrandFromPdb
instance.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
from
Fill a builder with attribute values from the providedpl.poznan.put.structure.formats.AbstractCombinedStrand
instance.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
addInputStrands
Adds one element toinputStrands
list.- Parameters:
element
- A inputStrands element- Returns:
this
builder for use in a chained invocation
-
addInputStrands
Adds elements toinputStrands
list.- Parameters:
elements
- An array of inputStrands elements- Returns:
this
builder for use in a chained invocation
-
inputStrands
public final ImmutableCombinedStrandFromPdb.Builder inputStrands(Iterable<? extends Strand> elements) Sets or replaces all elements forinputStrands
list.- Parameters:
elements
- An iterable of inputStrands elements- Returns:
this
builder for use in a chained invocation
-
addAllInputStrands
public final ImmutableCombinedStrandFromPdb.Builder addAllInputStrands(Iterable<? extends Strand> elements) Adds elements toinputStrands
list.- Parameters:
elements
- An iterable of inputStrands elements- Returns:
this
builder for use in a chained invocation
-
putInputSymbolToResidue
public final ImmutableCombinedStrandFromPdb.Builder putInputSymbolToResidue(DotBracketSymbol key, PdbResidueIdentifier value) Put one entry to theinputSymbolToResidue
map.- Parameters:
key
- The key in the inputSymbolToResidue mapvalue
- The associated value in the inputSymbolToResidue map- Returns:
this
builder for use in a chained invocation
-
putInputSymbolToResidue
public final ImmutableCombinedStrandFromPdb.Builder putInputSymbolToResidue(Map.Entry<? extends DotBracketSymbol, ? extends PdbResidueIdentifier> entry) Put one entry to theinputSymbolToResidue
map. Nulls are not permitted- Parameters:
entry
- The key and value entry- Returns:
this
builder for use in a chained invocation
-
inputSymbolToResidue
public final ImmutableCombinedStrandFromPdb.Builder inputSymbolToResidue(Map<? extends DotBracketSymbol, ? extends PdbResidueIdentifier> entries) Sets or replaces all mappings from the specified map as entries for theinputSymbolToResidue
map. Nulls are not permitted- Parameters:
entries
- The entries that will be added to the inputSymbolToResidue map- Returns:
this
builder for use in a chained invocation
-
putAllInputSymbolToResidue
public final ImmutableCombinedStrandFromPdb.Builder putAllInputSymbolToResidue(Map<? extends DotBracketSymbol, ? extends PdbResidueIdentifier> entries) Put all mappings from the specified map as entries toinputSymbolToResidue
map. Nulls are not permitted- Parameters:
entries
- The entries that will be added to the inputSymbolToResidue map- Returns:
this
builder for use in a chained invocation
-
build
Builds a newImmutableCombinedStrandFromPdb
.- Returns:
- An immutable instance of CombinedStrandFromPdb
- Throws:
IllegalStateException
- if any required attributes are missing
-