Class ImmutableDefaultDotBracketFromPdb
- java.lang.Object
-
- pl.poznan.put.structure.formats.DefaultDotBracketFromPdb
-
- pl.poznan.put.structure.formats.ImmutableDefaultDotBracketFromPdb
-
- All Implemented Interfaces:
DotBracket,DotBracketFromPdb
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable public final class ImmutableDefaultDotBracketFromPdb extends DefaultDotBracketFromPdb
Immutable implementation ofDefaultDotBracketFromPdb.Use the builder to create immutable instances:
ImmutableDefaultDotBracketFromPdb.builder(). Use the static factory method to create immutable instances:ImmutableDefaultDotBracketFromPdb.of().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableDefaultDotBracketFromPdb.BuilderBuilds instances of typeImmutableDefaultDotBracketFromPdb.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableDefaultDotBracketFromPdb.Builderbuilder()Creates a builder forImmutableDefaultDotBracketFromPdb.protected List<List<Strand>>candidatesToCombine()static ImmutableDefaultDotBracketFromPdbcopyOf(DefaultDotBracketFromPdb instance)Creates an immutable copy of aDefaultDotBracketFromPdbvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableDefaultDotBracketFromPdbthat have equal attribute values.inthashCode()Computes a hash code from attributes:identifierSet,model,sequence,structure.Set<PdbResidueIdentifier>identifierSet()PdbModelmodel()static ImmutableDefaultDotBracketFromPdbof(String sequence, String structure, PdbModel model)Construct a new immutableDefaultDotBracketFromPdbinstance.Map<DotBracketSymbol,DotBracketSymbol>pairs()protected Map<PdbResidueIdentifier,DotBracketSymbol>residueToSymbol()Stringsequence()List<Strand>strands()Stringstructure()List<DotBracketSymbol>symbols()protected Map<DotBracketSymbol,PdbResidueIdentifier>symbolToResidue()StringtoString()Prints the immutable valueDefaultDotBracketFromPdbwith attribute values.ImmutableDefaultDotBracketFromPdbwithIdentifierSet(Iterable<? extends PdbResidueIdentifier> elements)Copy the current immutable object with elements that replace the content ofidentifierSet.ImmutableDefaultDotBracketFromPdbwithIdentifierSet(PdbResidueIdentifier... elements)Copy the current immutable object with elements that replace the content ofidentifierSet.ImmutableDefaultDotBracketFromPdbwithModel(PdbModel value)Copy the current immutable object by setting a value for themodelattribute.ImmutableDefaultDotBracketFromPdbwithSequence(String value)Copy the current immutable object by setting a value for thesequenceattribute.ImmutableDefaultDotBracketFromPdbwithStrands(Iterable<? extends Strand> elements)Copy the current immutable object with elements that replace the content ofstrands.ImmutableDefaultDotBracketFromPdbwithStrands(Strand... elements)Copy the current immutable object with elements that replace the content ofstrands.ImmutableDefaultDotBracketFromPdbwithStructure(String value)Copy the current immutable object by setting a value for thestructureattribute.-
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, length, missingInternal, missingTerminal, pseudoknotOrder, sequence, structure, symbols, toStringWithStrands
-
-
-
-
Method Detail
-
identifierSet
public Set<PdbResidueIdentifier> identifierSet()
- Returns:
- The set of residue identifiers used in this structure.
-
model
public PdbModel model()
- Specified by:
modelin classDefaultDotBracketFromPdb- Returns:
- The value of the
modelattribute
-
strands
public List<Strand> strands()
- Specified by:
strandsin interfaceDotBracket- Overrides:
strandsin classDefaultDotBracketFromPdb- Returns:
- The value of the
strandsattribute
-
sequence
public String sequence()
- Specified by:
sequencein interfaceDotBracket- Specified by:
sequencein classDefaultDotBracketFromPdb- Returns:
- The value of the
sequenceattribute
-
structure
public String structure()
- Specified by:
structurein interfaceDotBracket- Specified by:
structurein classDefaultDotBracketFromPdb- Returns:
- The value of the
structureattribute
-
withIdentifierSet
public final ImmutableDefaultDotBracketFromPdb withIdentifierSet(PdbResidueIdentifier... elements)
Copy the current immutable object with elements that replace the content ofidentifierSet.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
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
thisobject
-
withModel
public final ImmutableDefaultDotBracketFromPdb withModel(PdbModel value)
Copy the current immutable object by setting a value for themodelattribute. 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
thisobject
-
withStrands
public final ImmutableDefaultDotBracketFromPdb withStrands(Strand... elements)
Copy the current immutable object with elements that replace the content ofstrands.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withStrands
public final ImmutableDefaultDotBracketFromPdb withStrands(Iterable<? extends Strand> elements)
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
thisobject
-
withSequence
public final ImmutableDefaultDotBracketFromPdb withSequence(String value)
Copy the current immutable object by setting a value for thesequenceattribute. 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
thisobject
-
withStructure
public final ImmutableDefaultDotBracketFromPdb withStructure(String value)
Copy the current immutable object by setting a value for thestructureattribute. 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
thisobject
-
equals
public boolean equals(@Nullable Object another)
This instance is equal to all instances ofImmutableDefaultDotBracketFromPdbthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:identifierSet,model,sequence,structure.
-
toString
public String toString()
Prints the immutable valueDefaultDotBracketFromPdbwith attribute values.
-
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 classDefaultDotBracketFromPdb- Returns:
- A lazily initialized value of the
pairsattribute
-
residueToSymbol
protected Map<PdbResidueIdentifier,DotBracketSymbol> residueToSymbol()
Returns a lazily initialized value of the
residueToSymbolattribute. 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:
residueToSymbolin classDefaultDotBracketFromPdb- Returns:
- A lazily initialized value of the
residueToSymbolattribute
-
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 classDefaultDotBracketFromPdb- Returns:
- A lazily initialized value of the
symbolToResidueattribute
-
of
public static ImmutableDefaultDotBracketFromPdb of(String sequence, String structure, PdbModel model)
Construct a new immutableDefaultDotBracketFromPdbinstance.- Parameters:
sequence- The value for thesequenceattributestructure- The value for thestructureattributemodel- The value for themodelattribute- Returns:
- An immutable DefaultDotBracketFromPdb instance
-
copyOf
public static ImmutableDefaultDotBracketFromPdb copyOf(DefaultDotBracketFromPdb instance)
Creates an immutable copy of aDefaultDotBracketFromPdbvalue. 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
public static ImmutableDefaultDotBracketFromPdb.Builder builder()
Creates a builder forImmutableDefaultDotBracketFromPdb.ImmutableDefaultDotBracketFromPdb.builder() .addIdentifierSet|addAllIdentifierSet(pl.poznan.put.pdb.PdbResidueIdentifier) //identifierSetelements .model(pl.poznan.put.pdb.analysis.PdbModel) // requiredmodel.addStrands|addAllStrands(pl.poznan.put.structure.formats.Strand) //strandselements .sequence(String) // requiredsequence.structure(String) // requiredstructure.build();- Returns:
- A new ImmutableDefaultDotBracketFromPdb builder
-
symbols
public List<DotBracketSymbol> symbols()
- Specified by:
symbolsin interfaceDotBracket- Returns:
- The list of dot-bracket symbols.
-
-