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 classBuilds instances of typeImmutableCombinedStrandFromPdb. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutableCombinedStrandFromPdb.copyOf(CombinedStrandFromPdb instance) Creates an immutable copy of aCombinedStrandFromPdbvalue.booleanThis instance is equal to all instances ofImmutableCombinedStrandFromPdbthat have equal attribute values.inthashCode()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 immutableCombinedStrandFromPdbinstance.of(List<Strand> inputStrands, Map<DotBracketSymbol, PdbResidueIdentifier> inputSymbolToResidue) Construct a new immutableCombinedStrandFromPdbinstance.pairs()strands()symbols()protected Map<DotBracketSymbol,PdbResidueIdentifier> toString()Prints the immutable valueCombinedStrandFromPdbwith 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 theinputSymbolToResiduemap with the specified map.Methods inherited from class pl.poznan.put.structure.formats.CombinedStrandFromPdb
combineStrands, contains, identifier, identifierSet, originalIndex, symbolMethods inherited from class pl.poznan.put.structure.formats.AbstractCombinedStrand
combineStrandsMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods 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:
inputStrandsin classCombinedStrandFromPdb- Returns:
- The list of input strands.
-
inputSymbolToResidue
- Specified by:
inputSymbolToResiduein 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
thisobject
-
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
thisobject
-
withInputSymbolToResidue
public final ImmutableCombinedStrandFromPdb withInputSymbolToResidue(Map<? extends DotBracketSymbol, ? extends PdbResidueIdentifier> entries) Copy the current immutable object by replacing theinputSymbolToResiduemap 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
thisobject
-
equals
This instance is equal to all instances ofImmutableCombinedStrandFromPdbthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:inputStrands,inputSymbolToResidue. -
toString
Prints the immutable valueCombinedStrandFromPdbwith attribute values. -
symbols
Returns a lazily initialized value of the
symbolsattribute. 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:
symbolsin interfaceDotBracket- Overrides:
symbolsin classCombinedStrandFromPdb- Returns:
- A lazily initialized value of the
symbolsattribute
-
strands
Returns a lazily initialized value of the
strandsattribute. 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:
strandsin interfaceDotBracket- Overrides:
strandsin classCombinedStrandFromPdb- Returns:
- A lazily initialized value of the
strandsattribute
-
pairs
Returns a lazily initialized value of the
pairsattribute. 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:
pairsin interfaceDotBracket- Overrides:
pairsin classCombinedStrandFromPdb- Returns:
- A lazily initialized value of the
pairsattribute
-
symbolToResidue
Returns a lazily initialized value of the
symbolToResidueattribute. 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:
symbolToResiduein classCombinedStrandFromPdb- Returns:
- A lazily initialized value of the
symbolToResidueattribute
-
mapping
Returns a lazily initialized value of the
mappingattribute. 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:
mappingin classCombinedStrandFromPdb- Returns:
- A lazily initialized value of the
mappingattribute
-
of
public static ImmutableCombinedStrandFromPdb of(List<Strand> inputStrands, Map<DotBracketSymbol, PdbResidueIdentifier> inputSymbolToResidue) Construct a new immutableCombinedStrandFromPdbinstance.- Parameters:
inputStrands- The value for theinputStrandsattributeinputSymbolToResidue- The value for theinputSymbolToResidueattribute- Returns:
- An immutable CombinedStrandFromPdb instance
-
of
public static ImmutableCombinedStrandFromPdb of(Iterable<? extends Strand> inputStrands, Map<? extends DotBracketSymbol, ? extends PdbResidueIdentifier> inputSymbolToResidue) Construct a new immutableCombinedStrandFromPdbinstance.- Parameters:
inputStrands- The value for theinputStrandsattributeinputSymbolToResidue- The value for theinputSymbolToResidueattribute- Returns:
- An immutable CombinedStrandFromPdb instance
-
copyOf
Creates an immutable copy of aCombinedStrandFromPdbvalue. 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) //inputStrandselements .putInputSymbolToResidue|putAllInputSymbolToResidue(pl.poznan.put.structure.DotBracketSymbol => pl.poznan.put.pdb.PdbResidueIdentifier) //inputSymbolToResiduemappings .build();- Returns:
- A new ImmutableCombinedStrandFromPdb builder
-