Class ImmutableDefaultDotBracketFromPdb
- All Implemented Interfaces:
DotBracket
,DotBracketFromPdb
DefaultDotBracketFromPdb
.
Use the builder to create immutable instances:
ImmutableDefaultDotBracketFromPdb.builder()
.
Use the static factory method to create immutable instances:
ImmutableDefaultDotBracketFromPdb.of()
.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
Builds instances of typeImmutableDefaultDotBracketFromPdb
. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
Creates a builder forImmutableDefaultDotBracketFromPdb
.copyOf
(DefaultDotBracketFromPdb instance) Creates an immutable copy of aDefaultDotBracketFromPdb
value.boolean
This instance is equal to all instances ofImmutableDefaultDotBracketFromPdb
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:identifierSet
,model
,sequence
,structure
.model()
Construct a new immutableDefaultDotBracketFromPdb
instance.pairs()
protected Map<PdbResidueIdentifier,
DotBracketSymbol> sequence()
strands()
symbols()
protected Map<DotBracketSymbol,
PdbResidueIdentifier> toString()
Prints the immutable valueDefaultDotBracketFromPdb
with attribute values.withIdentifierSet
(Iterable<? extends PdbResidueIdentifier> elements) Copy the current immutable object with elements that replace the content ofidentifierSet
.withIdentifierSet
(PdbResidueIdentifier... elements) Copy the current immutable object with elements that replace the content ofidentifierSet
.Copy the current immutable object by setting a value for themodel
attribute.withSequence
(String value) Copy the current immutable object by setting a value for thesequence
attribute.withStrands
(Iterable<? extends Strand> elements) Copy the current immutable object with elements that replace the content ofstrands
.withStrands
(Strand... elements) Copy the current immutable object with elements that replace the content ofstrands
.withStructure
(String value) Copy the current immutable object by setting a value for thestructure
attribute.Methods inherited from class pl.poznan.put.structure.formats.DefaultDotBracketFromPdb
combineStrands, combineStrands, contains, identifier, originalIndex, symbol, validate
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
containsMissing, findStrand, isIsolated, isolatedSymbols, length, missingInternal, missingTerminal, pseudoknotOrder, sequence, structure, symbols, toStringWithStrands
-
Method Details
-
identifierSet
- Returns:
- The set of residue identifiers used in this structure.
-
model
- Specified by:
model
in classDefaultDotBracketFromPdb
- Returns:
- The value of the
model
attribute
-
strands
- Specified by:
strands
in interfaceDotBracket
- Overrides:
strands
in classDefaultDotBracketFromPdb
- Returns:
- The value of the
strands
attribute
-
sequence
- Specified by:
sequence
in interfaceDotBracket
- Specified by:
sequence
in classDefaultDotBracketFromPdb
- Returns:
- The value of the
sequence
attribute
-
structure
- Specified by:
structure
in interfaceDotBracket
- Specified by:
structure
in classDefaultDotBracketFromPdb
- Returns:
- The value of the
structure
attribute
-
withIdentifierSet
Copy the current immutable object with elements that replace the content ofidentifierSet
.- Parameters:
elements
- The elements to set- Returns:
- A modified copy of
this
object
-
withIdentifierSet
public final ImmutableDefaultDotBracketFromPdb withIdentifierSet(Iterable<? extends PdbResidueIdentifier> elements) Copy the current immutable object with elements that replace the content ofidentifierSet
. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
elements
- An iterable of identifierSet elements to set- Returns:
- A modified copy of
this
object
-
withModel
Copy the current immutable object by setting a value for themodel
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for model- Returns:
- A modified copy of the
this
object
-
withStrands
Copy the current immutable object with elements that replace the content ofstrands
.- Parameters:
elements
- The elements to set- Returns:
- A modified copy of
this
object
-
withStrands
Copy the current immutable object with elements that replace the content ofstrands
. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
elements
- An iterable of strands elements to set- Returns:
- A modified copy of
this
object
-
withSequence
Copy the current immutable object by setting a value for thesequence
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for sequence- Returns:
- A modified copy of the
this
object
-
withStructure
Copy the current immutable object by setting a value for thestructure
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for structure- Returns:
- A modified copy of the
this
object
-
equals
This instance is equal to all instances ofImmutableDefaultDotBracketFromPdb
that have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:identifierSet
,model
,sequence
,structure
. -
toString
Prints the immutable valueDefaultDotBracketFromPdb
with attribute values. -
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 classDefaultDotBracketFromPdb
- Returns:
- A lazily initialized value of the
pairs
attribute
-
residueToSymbol
Returns a lazily initialized value of the
residueToSymbol
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:
residueToSymbol
in classDefaultDotBracketFromPdb
- Returns:
- A lazily initialized value of the
residueToSymbol
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 classDefaultDotBracketFromPdb
- Returns:
- A lazily initialized value of the
symbolToResidue
attribute
-
of
public static ImmutableDefaultDotBracketFromPdb of(String sequence, String structure, PdbModel model) Construct a new immutableDefaultDotBracketFromPdb
instance.- Parameters:
sequence
- The value for thesequence
attributestructure
- The value for thestructure
attributemodel
- The value for themodel
attribute- Returns:
- An immutable DefaultDotBracketFromPdb instance
-
copyOf
Creates an immutable copy of aDefaultDotBracketFromPdb
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 DefaultDotBracketFromPdb instance
-
builder
Creates a builder forImmutableDefaultDotBracketFromPdb
.ImmutableDefaultDotBracketFromPdb.builder() .addIdentifierSet|addAllIdentifierSet(pl.poznan.put.pdb.PdbResidueIdentifier) //
identifierSet
elements .model(pl.poznan.put.pdb.analysis.PdbModel) // requiredmodel
.addStrands|addAllStrands(pl.poznan.put.structure.formats.Strand) //strands
elements .sequence(String) // requiredsequence
.structure(String) // requiredstructure
.build();- Returns:
- A new ImmutableDefaultDotBracketFromPdb builder
-
symbols
- Specified by:
symbols
in interfaceDotBracket
- Returns:
- The list of dot-bracket symbols.
-
candidatesToCombine
-