Class ImmutableCombinedStrandFromPdb
- All Implemented Interfaces:
DotBracket
,DotBracketFromPdb
CombinedStrandFromPdb
.
Use the builder to create immutable instances:
ImmutableCombinedStrandFromPdb.builder()
.
Use the static factory method to create immutable instances:
ImmutableCombinedStrandFromPdb.of()
.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
Builds instances of typeImmutableCombinedStrandFromPdb
. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
Creates a builder forImmutableCombinedStrandFromPdb
.copyOf
(CombinedStrandFromPdb instance) Creates an immutable copy of aCombinedStrandFromPdb
value.boolean
This instance is equal to all instances ofImmutableCombinedStrandFromPdb
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:inputStrands
,inputSymbolToResidue
.protected Map<DotBracketSymbol,
PdbResidueIdentifier> protected org.apache.commons.collections4.BidiMap<DotBracketSymbol,
PdbResidueIdentifier> mapping()
of
(Iterable<? extends Strand> inputStrands, Map<? extends DotBracketSymbol, ? extends PdbResidueIdentifier> inputSymbolToResidue) Construct a new immutableCombinedStrandFromPdb
instance.of
(List<Strand> inputStrands, Map<DotBracketSymbol, PdbResidueIdentifier> inputSymbolToResidue) Construct a new immutableCombinedStrandFromPdb
instance.pairs()
strands()
symbols()
protected Map<DotBracketSymbol,
PdbResidueIdentifier> toString()
Prints the immutable valueCombinedStrandFromPdb
with attribute values.withInputStrands
(Iterable<? extends Strand> elements) Copy the current immutable object with elements that replace the content ofinputStrands
.withInputStrands
(Strand... elements) Copy the current immutable object with elements that replace the content ofinputStrands
.withInputSymbolToResidue
(Map<? extends DotBracketSymbol, ? extends PdbResidueIdentifier> entries) Copy the current immutable object by replacing theinputSymbolToResidue
map with the specified map.Methods inherited from class pl.poznan.put.structure.formats.CombinedStrandFromPdb
combineStrands, contains, identifier, identifierSet, originalIndex, symbol
Methods inherited from class pl.poznan.put.structure.formats.AbstractCombinedStrand
combineStrands
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface pl.poznan.put.structure.formats.DotBracket
combineStrands, containsMissing, findStrand, isIsolated, isolatedSymbols, length, missingInternal, missingTerminal, pseudoknotOrder, sequence, sequence, structure, structure, toStringWithStrands
-
Method Details
-
inputStrands
- Specified by:
inputStrands
in classCombinedStrandFromPdb
- Returns:
- The list of input strands.
-
inputSymbolToResidue
- Specified by:
inputSymbolToResidue
in classCombinedStrandFromPdb
- Returns:
- The mapping of dot-bracket symbols with corresponding PDB identifiers.
-
withInputStrands
Copy the current immutable object with elements that replace the content ofinputStrands
.- Parameters:
elements
- The elements to set- Returns:
- A modified copy of
this
object
-
withInputStrands
Copy the current immutable object with elements that replace the content ofinputStrands
. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
elements
- An iterable of inputStrands elements to set- Returns:
- A modified copy of
this
object
-
withInputSymbolToResidue
public final ImmutableCombinedStrandFromPdb withInputSymbolToResidue(Map<? extends DotBracketSymbol, ? extends PdbResidueIdentifier> entries) Copy the current immutable object by replacing theinputSymbolToResidue
map with the specified map. Nulls are not permitted as keys or values. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
entries
- The entries to be added to the inputSymbolToResidue map- Returns:
- A modified copy of
this
object
-
equals
This instance is equal to all instances ofImmutableCombinedStrandFromPdb
that have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:inputStrands
,inputSymbolToResidue
. -
toString
Prints the immutable valueCombinedStrandFromPdb
with attribute values. -
symbols
Returns a lazily initialized value of the
symbols
attribute. Initialized once and only once and stored for subsequent access with proper synchronization. In case of any exception or error thrown by the lazy value initializer, the result will not be memoised (i.e. remembered) and on next call computation will be attempted again.- Specified by:
symbols
in interfaceDotBracket
- Overrides:
symbols
in classCombinedStrandFromPdb
- Returns:
- A lazily initialized value of the
symbols
attribute
-
strands
Returns a lazily initialized value of the
strands
attribute. Initialized once and only once and stored for subsequent access with proper synchronization. In case of any exception or error thrown by the lazy value initializer, the result will not be memoised (i.e. remembered) and on next call computation will be attempted again.- Specified by:
strands
in interfaceDotBracket
- Overrides:
strands
in classCombinedStrandFromPdb
- Returns:
- A lazily initialized value of the
strands
attribute
-
pairs
Returns a lazily initialized value of the
pairs
attribute. Initialized once and only once and stored for subsequent access with proper synchronization. In case of any exception or error thrown by the lazy value initializer, the result will not be memoised (i.e. remembered) and on next call computation will be attempted again.- Specified by:
pairs
in interfaceDotBracket
- Overrides:
pairs
in classCombinedStrandFromPdb
- Returns:
- A lazily initialized value of the
pairs
attribute
-
symbolToResidue
Returns a lazily initialized value of the
symbolToResidue
attribute. Initialized once and only once and stored for subsequent access with proper synchronization. In case of any exception or error thrown by the lazy value initializer, the result will not be memoised (i.e. remembered) and on next call computation will be attempted again.- Overrides:
symbolToResidue
in classCombinedStrandFromPdb
- Returns:
- A lazily initialized value of the
symbolToResidue
attribute
-
mapping
Returns a lazily initialized value of the
mapping
attribute. Initialized once and only once and stored for subsequent access with proper synchronization. In case of any exception or error thrown by the lazy value initializer, the result will not be memoised (i.e. remembered) and on next call computation will be attempted again.- Overrides:
mapping
in classCombinedStrandFromPdb
- Returns:
- A lazily initialized value of the
mapping
attribute
-
of
public static ImmutableCombinedStrandFromPdb of(List<Strand> inputStrands, Map<DotBracketSymbol, PdbResidueIdentifier> inputSymbolToResidue) Construct a new immutableCombinedStrandFromPdb
instance.- Parameters:
inputStrands
- The value for theinputStrands
attributeinputSymbolToResidue
- The value for theinputSymbolToResidue
attribute- Returns:
- An immutable CombinedStrandFromPdb instance
-
of
public static ImmutableCombinedStrandFromPdb of(Iterable<? extends Strand> inputStrands, Map<? extends DotBracketSymbol, ? extends PdbResidueIdentifier> inputSymbolToResidue) Construct a new immutableCombinedStrandFromPdb
instance.- Parameters:
inputStrands
- The value for theinputStrands
attributeinputSymbolToResidue
- The value for theinputSymbolToResidue
attribute- Returns:
- An immutable CombinedStrandFromPdb instance
-
copyOf
Creates an immutable copy of aCombinedStrandFromPdb
value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance
- The instance to copy- Returns:
- A copied immutable CombinedStrandFromPdb instance
-
builder
Creates a builder forImmutableCombinedStrandFromPdb
.ImmutableCombinedStrandFromPdb.builder() .addInputStrands|addAllInputStrands(pl.poznan.put.structure.formats.Strand) //
inputStrands
elements .putInputSymbolToResidue|putAllInputSymbolToResidue(pl.poznan.put.structure.DotBracketSymbol => pl.poznan.put.pdb.PdbResidueIdentifier) //inputSymbolToResidue
mappings .build();- Returns:
- A new ImmutableCombinedStrandFromPdb builder
-