Class ImmutableCombinedStrandFromPdb
- java.lang.Object
-
- pl.poznan.put.structure.formats.AbstractCombinedStrand
-
- pl.poznan.put.structure.formats.CombinedStrandFromPdb
-
- pl.poznan.put.structure.formats.ImmutableCombinedStrandFromPdb
-
- All Implemented Interfaces:
DotBracket,DotBracketFromPdb
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable public final class ImmutableCombinedStrandFromPdb extends CombinedStrandFromPdb
Immutable implementation ofCombinedStrandFromPdb.Use the builder to create immutable instances:
ImmutableCombinedStrandFromPdb.builder(). Use the static factory method to create immutable instances:ImmutableCombinedStrandFromPdb.of().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableCombinedStrandFromPdb.BuilderBuilds instances of typeImmutableCombinedStrandFromPdb.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableCombinedStrandFromPdb.Builderbuilder()Creates a builder forImmutableCombinedStrandFromPdb.List<DotBracket>combineStrands()Combines strands which share a base pair into a new dot-bracket instance and returns a list of those.static ImmutableCombinedStrandFromPdbcopyOf(CombinedStrandFromPdb instance)Creates an immutable copy of aCombinedStrandFromPdbvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableCombinedStrandFromPdbthat have equal attribute values.inthashCode()Computes a hash code from attributes:combineStrands,inputStrands,inputSymbolToResidue.protected List<Strand>inputStrands()protected Map<DotBracketSymbol,PdbResidueIdentifier>inputSymbolToResidue()protected org.apache.commons.collections4.BidiMap<DotBracketSymbol,PdbResidueIdentifier>mapping()static ImmutableCombinedStrandFromPdbof(Iterable<? extends Strand> inputStrands, Map<? extends DotBracketSymbol,? extends PdbResidueIdentifier> inputSymbolToResidue)Construct a new immutableCombinedStrandFromPdbinstance.static ImmutableCombinedStrandFromPdbof(List<Strand> inputStrands, Map<DotBracketSymbol,PdbResidueIdentifier> inputSymbolToResidue)Construct a new immutableCombinedStrandFromPdbinstance.Map<DotBracketSymbol,DotBracketSymbol>pairs()List<Strand>strands()List<DotBracketSymbol>symbols()protected Map<DotBracketSymbol,PdbResidueIdentifier>symbolToResidue()StringtoString()Prints the immutable valueCombinedStrandFromPdbwith attribute values.ImmutableCombinedStrandFromPdbwithCombineStrands(Iterable<? extends DotBracket> elements)Copy the current immutable object with elements that replace the content ofcombineStrands.ImmutableCombinedStrandFromPdbwithCombineStrands(DotBracket... elements)Copy the current immutable object with elements that replace the content ofcombineStrands.ImmutableCombinedStrandFromPdbwithInputStrands(Iterable<? extends Strand> elements)Copy the current immutable object with elements that replace the content ofinputStrands.ImmutableCombinedStrandFromPdbwithInputStrands(Strand... elements)Copy the current immutable object with elements that replace the content ofinputStrands.ImmutableCombinedStrandFromPdbwithInputSymbolToResidue(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, symbol
-
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, length, missingInternal, missingTerminal, pseudoknotOrder, sequence, sequence, structure, structure, toStringWithStrands
-
-
-
-
Method Detail
-
combineStrands
public List<DotBracket> combineStrands()
Combines strands which share a base pair into a new dot-bracket instance and returns a list of those.- Returns:
- The list of dot-bracket instances, each containing strands which only pair with each other.
-
inputStrands
protected List<Strand> inputStrands()
- Specified by:
inputStrandsin classCombinedStrandFromPdb- Returns:
- The list of input strands.
-
inputSymbolToResidue
protected Map<DotBracketSymbol,PdbResidueIdentifier> inputSymbolToResidue()
- Specified by:
inputSymbolToResiduein classCombinedStrandFromPdb- Returns:
- The mapping of dot-bracket symbols with corresponding PDB identifiers.
-
withCombineStrands
public final ImmutableCombinedStrandFromPdb withCombineStrands(DotBracket... elements)
Copy the current immutable object with elements that replace the content ofcombineStrands.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withCombineStrands
public final ImmutableCombinedStrandFromPdb withCombineStrands(Iterable<? extends DotBracket> elements)
Copy the current immutable object with elements that replace the content ofcombineStrands. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of combineStrands elements to set- Returns:
- A modified copy of
thisobject
-
withInputStrands
public final ImmutableCombinedStrandFromPdb withInputStrands(Strand... elements)
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
public final ImmutableCombinedStrandFromPdb withInputStrands(Iterable<? extends Strand> elements)
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
public boolean equals(@Nullable Object another)
This instance is equal to all instances ofImmutableCombinedStrandFromPdbthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:combineStrands,inputStrands,inputSymbolToResidue.
-
toString
public String toString()
Prints the immutable valueCombinedStrandFromPdbwith attribute values.
-
symbols
public List<DotBracketSymbol> 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
public List<Strand> 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
public Map<DotBracketSymbol,DotBracketSymbol> 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
protected Map<DotBracketSymbol,PdbResidueIdentifier> 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
protected org.apache.commons.collections4.BidiMap<DotBracketSymbol,PdbResidueIdentifier> 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
public static ImmutableCombinedStrandFromPdb copyOf(CombinedStrandFromPdb instance)
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
public static ImmutableCombinedStrandFromPdb.Builder builder()
Creates a builder forImmutableCombinedStrandFromPdb.ImmutableCombinedStrandFromPdb.builder() .addCombineStrands|addAllCombineStrands(pl.poznan.put.structure.formats.DotBracket) //combineStrandselements .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
-
-