Class ImmutableDefaultPdbResidue
- All Implemented Interfaces:
Serializable,Comparable<ChainNumberICode>,PdbResidue,ChainNumberICode
DefaultPdbResidue.
Use the builder to create immutable instances:
ImmutableDefaultPdbResidue.builder().
Use the static factory method to create immutable instances:
ImmutableDefaultPdbResidue.of().
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableDefaultPdbResidue. -
Method Summary
Modifier and TypeMethodDescriptionatoms()builder()Creates a builder forImmutableDefaultPdbResidue.static ImmutableDefaultPdbResiduecopyOf(DefaultPdbResidue instance) Creates an immutable copy of aDefaultPdbResiduevalue.booleanThis instance is equal to all instances ofImmutableDefaultPdbResiduethat have equal attribute values.booleanCompares the set of actual atoms in this residue with the set of expected atoms derived from the detected type of residue.inthashCode()Computes a hash code from attributes:identifier,standardResidueName,modifiedResidueName,atoms.static ImmutableDefaultPdbResidueof(PdbResidueIdentifier identifier, String standardResidueName, String modifiedResidueName, Iterable<? extends PdbAtomLine> atoms) Construct a new immutableDefaultPdbResidueinstance.static ImmutableDefaultPdbResidueof(PdbResidueIdentifier identifier, String standardResidueName, String modifiedResidueName, List<PdbAtomLine> atoms) Construct a new immutableDefaultPdbResidueinstance.Detects the type of residue by its name and atom content.withAtoms(Iterable<? extends PdbAtomLine> elements) Copy the current immutable object with elements that replace the content ofatoms.withAtoms(PdbAtomLine... elements) Copy the current immutable object with elements that replace the content ofatoms.Copy the current immutable object by setting a value for theidentifierattribute.withModifiedResidueName(String value) Copy the current immutable object by setting a value for themodifiedResidueNameattribute.withStandardResidueName(String value) Copy the current immutable object by setting a value for thestandardResidueNameattribute.Methods inherited from class pl.poznan.put.pdb.analysis.DefaultPdbResidue
toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface pl.poznan.put.pdb.ChainNumberICode
compareToMethods inherited from interface pl.poznan.put.pdb.analysis.PdbResidue
chainIdentifier, findAtom, hasAnyHydrogen, hasAtom, insertionCode, isConnectedTo, isMissing, isModified, namedResidueIdentifier, nucleobasePlane, oneLetterName, residueNumber, toCif, toPdb
-
Method Details
-
identifier
- Specified by:
identifierin interfacePdbResidue- Specified by:
identifierin classDefaultPdbResidue- Returns:
- The value of the
identifierattribute
-
standardResidueName
- Specified by:
standardResidueNamein interfacePdbResidue- Specified by:
standardResidueNamein classDefaultPdbResidue- Returns:
- The value of the
standardResidueNameattribute
-
modifiedResidueName
- Specified by:
modifiedResidueNamein interfacePdbResidue- Specified by:
modifiedResidueNamein classDefaultPdbResidue- Returns:
- The value of the
modifiedResidueNameattribute
-
atoms
- Specified by:
atomsin interfacePdbResidue- Specified by:
atomsin classDefaultPdbResidue- Returns:
- The value of the
atomsattribute
-
withIdentifier
Copy the current immutable object by setting a value for theidentifierattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for identifier- Returns:
- A modified copy of the
thisobject
-
withStandardResidueName
Copy the current immutable object by setting a value for thestandardResidueNameattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for standardResidueName- Returns:
- A modified copy of the
thisobject
-
withModifiedResidueName
Copy the current immutable object by setting a value for themodifiedResidueNameattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for modifiedResidueName- Returns:
- A modified copy of the
thisobject
-
withAtoms
Copy the current immutable object with elements that replace the content ofatoms.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withAtoms
Copy the current immutable object with elements that replace the content ofatoms. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of atoms elements to set- Returns:
- A modified copy of
thisobject
-
equals
This instance is equal to all instances ofImmutableDefaultPdbResiduethat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:identifier,standardResidueName,modifiedResidueName,atoms. -
residueInformationProvider
Detects the type of residue by its name and atom content.Returns a lazily initialized value of the
residueInformationProviderattribute. 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:
residueInformationProviderin interfacePdbResidue- Overrides:
residueInformationProviderin classDefaultPdbResidue- Returns:
- A lazily initialized value of the
residueInformationProviderattribute
-
atomNames
Returns a lazily initialized value of the
atomNamesattribute. 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:
atomNamesin interfacePdbResidue- Overrides:
atomNamesin classDefaultPdbResidue- Returns:
- A lazily initialized value of the
atomNamesattribute
-
hasAllHeavyAtoms
public boolean hasAllHeavyAtoms()Compares the set of actual atoms in this residue with the set of expected atoms derived from the detected type of residue.Returns a lazily initialized value of the
hasAllHeavyAtomsattribute. 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:
hasAllHeavyAtomsin interfacePdbResidue- Overrides:
hasAllHeavyAtomsin classDefaultPdbResidue- Returns:
- A lazily initialized value of the
hasAllHeavyAtomsattribute
-
of
public static ImmutableDefaultPdbResidue of(PdbResidueIdentifier identifier, String standardResidueName, String modifiedResidueName, List<PdbAtomLine> atoms) Construct a new immutableDefaultPdbResidueinstance.- Parameters:
identifier- The value for theidentifierattributestandardResidueName- The value for thestandardResidueNameattributemodifiedResidueName- The value for themodifiedResidueNameattributeatoms- The value for theatomsattribute- Returns:
- An immutable DefaultPdbResidue instance
-
of
public static ImmutableDefaultPdbResidue of(PdbResidueIdentifier identifier, String standardResidueName, String modifiedResidueName, Iterable<? extends PdbAtomLine> atoms) Construct a new immutableDefaultPdbResidueinstance.- Parameters:
identifier- The value for theidentifierattributestandardResidueName- The value for thestandardResidueNameattributemodifiedResidueName- The value for themodifiedResidueNameattributeatoms- The value for theatomsattribute- Returns:
- An immutable DefaultPdbResidue instance
-
copyOf
Creates an immutable copy of aDefaultPdbResiduevalue. 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 DefaultPdbResidue instance
-
builder
Creates a builder forImmutableDefaultPdbResidue.ImmutableDefaultPdbResidue.builder() .identifier(pl.poznan.put.pdb.PdbResidueIdentifier) // requiredidentifier.standardResidueName(String) // requiredstandardResidueName.modifiedResidueName(String) // requiredmodifiedResidueName.addAtoms|addAllAtoms(pl.poznan.put.pdb.PdbAtomLine) //atomselements .build();- Returns:
- A new ImmutableDefaultPdbResidue builder
-