Class ImmutableDefaultPdbModel
- All Implemented Interfaces:
Serializable
,PdbModel
,ResidueCollection
DefaultPdbModel
.
Use the builder to create immutable instances:
ImmutableDefaultPdbModel.builder()
.
Use the static factory method to create immutable instances:
ImmutableDefaultPdbModel.of()
.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
Builds instances of typeImmutableDefaultPdbModel
.Nested classes/interfaces inherited from interface pl.poznan.put.pdb.analysis.ResidueCollection
ResidueCollection.CifBuilder, ResidueCollection.PdbBuilder
-
Method Summary
Modifier and TypeMethodDescriptionatoms()
builder()
Creates a builder forImmutableDefaultPdbModel
.chains()
Groups together residues in the same chain and repeat that for every chain.static ImmutableDefaultPdbModel
copyOf
(DefaultPdbModel instance) Creates an immutable copy of aDefaultPdbModel
value.boolean
This instance is equal to all instances ofImmutableDefaultPdbModel
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:atoms
.header()
int
static ImmutableDefaultPdbModel
of
(PdbHeaderLine header, PdbExpdtaLine experimentalData, PdbRemark2Line resolution, int modelNumber, Iterable<? extends PdbAtomLine> atoms, Iterable<? extends PdbModresLine> modifiedResidues, Iterable<? extends PdbRemark465Line> missingResidues, String title, Iterable<? extends PdbResidueIdentifier> chainTerminatedAfter) Construct a new immutableDefaultPdbModel
instance.static ImmutableDefaultPdbModel
of
(PdbHeaderLine header, PdbExpdtaLine experimentalData, PdbRemark2Line resolution, int modelNumber, List<PdbAtomLine> atoms, List<PdbModresLine> modifiedResidues, List<PdbRemark465Line> missingResidues, String title, Set<PdbResidueIdentifier> chainTerminatedAfter) Construct a new immutableDefaultPdbModel
instance.residues()
Groups together atoms from the same residue and repeat that for every residue.title()
toString()
Prints the immutable valueDefaultPdbModel
with attribute values.final ImmutableDefaultPdbModel
withAtoms
(Iterable<? extends PdbAtomLine> elements) Copy the current immutable object with elements that replace the content ofatoms
.final ImmutableDefaultPdbModel
withAtoms
(PdbAtomLine... elements) Copy the current immutable object with elements that replace the content ofatoms
.final ImmutableDefaultPdbModel
withChainTerminatedAfter
(Iterable<? extends PdbResidueIdentifier> elements) Copy the current immutable object with elements that replace the content ofchainTerminatedAfter
.final ImmutableDefaultPdbModel
withChainTerminatedAfter
(PdbResidueIdentifier... elements) Copy the current immutable object with elements that replace the content ofchainTerminatedAfter
.final ImmutableDefaultPdbModel
Copy the current immutable object by setting a value for theexperimentalData
attribute.final ImmutableDefaultPdbModel
withHeader
(PdbHeaderLine value) Copy the current immutable object by setting a value for theheader
attribute.final ImmutableDefaultPdbModel
withMissingResidues
(Iterable<? extends PdbRemark465Line> elements) Copy the current immutable object with elements that replace the content ofmissingResidues
.final ImmutableDefaultPdbModel
withMissingResidues
(PdbRemark465Line... elements) Copy the current immutable object with elements that replace the content ofmissingResidues
.final ImmutableDefaultPdbModel
withModelNumber
(int value) Copy the current immutable object by setting a value for themodelNumber
attribute.final ImmutableDefaultPdbModel
withModifiedResidues
(Iterable<? extends PdbModresLine> elements) Copy the current immutable object with elements that replace the content ofmodifiedResidues
.final ImmutableDefaultPdbModel
withModifiedResidues
(PdbModresLine... elements) Copy the current immutable object with elements that replace the content ofmodifiedResidues
.final ImmutableDefaultPdbModel
withResolution
(PdbRemark2Line value) Copy the current immutable object by setting a value for theresolution
attribute.final ImmutableDefaultPdbModel
Copy the current immutable object by setting a value for thetitle
attribute.Methods inherited from class pl.poznan.put.pdb.analysis.DefaultPdbModel
filteredNewInstance, normalize, of
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface pl.poznan.put.pdb.analysis.PdbModel
containsAny, filteredMissing, findChainContainingResidue, idCode, isModified, modificationDetails
Methods inherited from interface pl.poznan.put.pdb.analysis.ResidueCollection
filteredAtoms, findBondLengthViolations, findResidue, hasResidue, indexOf, namedResidueIdentifiers, residueIdentifiers, sequence, toCif, toPdb, withoutAlternateLocations
-
Method Details
-
header
- Specified by:
header
in interfacePdbModel
- Specified by:
header
in classDefaultPdbModel
- Returns:
- The value of the
header
attribute
-
experimentalData
- Specified by:
experimentalData
in interfacePdbModel
- Specified by:
experimentalData
in classDefaultPdbModel
- Returns:
- The value of the
experimentalData
attribute
-
resolution
- Specified by:
resolution
in interfacePdbModel
- Specified by:
resolution
in classDefaultPdbModel
- Returns:
- The value of the
resolution
attribute
-
modelNumber
public int modelNumber()- Specified by:
modelNumber
in interfacePdbModel
- Specified by:
modelNumber
in classDefaultPdbModel
- Returns:
- The value of the
modelNumber
attribute
-
atoms
- Specified by:
atoms
in interfacePdbModel
- Specified by:
atoms
in classDefaultPdbModel
- Returns:
- The value of the
atoms
attribute
-
modifiedResidues
- Specified by:
modifiedResidues
in interfacePdbModel
- Specified by:
modifiedResidues
in classDefaultPdbModel
- Returns:
- The value of the
modifiedResidues
attribute
-
missingResidues
- Specified by:
missingResidues
in interfacePdbModel
- Specified by:
missingResidues
in classDefaultPdbModel
- Returns:
- The value of the
missingResidues
attribute
-
title
- Specified by:
title
in interfacePdbModel
- Specified by:
title
in classDefaultPdbModel
- Returns:
- The value of the
title
attribute
-
chainTerminatedAfter
- Specified by:
chainTerminatedAfter
in interfacePdbModel
- Specified by:
chainTerminatedAfter
in classDefaultPdbModel
- Returns:
- The value of the
chainTerminatedAfter
attribute
-
withHeader
Copy the current immutable object by setting a value for theheader
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for header- Returns:
- A modified copy of the
this
object
-
withExperimentalData
Copy the current immutable object by setting a value for theexperimentalData
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for experimentalData- Returns:
- A modified copy of the
this
object
-
withResolution
Copy the current immutable object by setting a value for theresolution
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for resolution- Returns:
- A modified copy of the
this
object
-
withModelNumber
Copy the current immutable object by setting a value for themodelNumber
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for modelNumber- Returns:
- A modified copy of the
this
object
-
withAtoms
Copy the current immutable object with elements that replace the content ofatoms
.- Parameters:
elements
- The elements to set- Returns:
- A modified copy of
this
object
-
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
this
object
-
withModifiedResidues
Copy the current immutable object with elements that replace the content ofmodifiedResidues
.- Parameters:
elements
- The elements to set- Returns:
- A modified copy of
this
object
-
withModifiedResidues
public final ImmutableDefaultPdbModel withModifiedResidues(Iterable<? extends PdbModresLine> elements) Copy the current immutable object with elements that replace the content ofmodifiedResidues
. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
elements
- An iterable of modifiedResidues elements to set- Returns:
- A modified copy of
this
object
-
withMissingResidues
Copy the current immutable object with elements that replace the content ofmissingResidues
.- Parameters:
elements
- The elements to set- Returns:
- A modified copy of
this
object
-
withMissingResidues
public final ImmutableDefaultPdbModel withMissingResidues(Iterable<? extends PdbRemark465Line> elements) Copy the current immutable object with elements that replace the content ofmissingResidues
. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
elements
- An iterable of missingResidues elements to set- Returns:
- A modified copy of
this
object
-
withTitle
Copy the current immutable object by setting a value for thetitle
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for title- Returns:
- A modified copy of the
this
object
-
withChainTerminatedAfter
Copy the current immutable object with elements that replace the content ofchainTerminatedAfter
.- Parameters:
elements
- The elements to set- Returns:
- A modified copy of
this
object
-
withChainTerminatedAfter
public final ImmutableDefaultPdbModel withChainTerminatedAfter(Iterable<? extends PdbResidueIdentifier> elements) Copy the current immutable object with elements that replace the content ofchainTerminatedAfter
. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
elements
- An iterable of chainTerminatedAfter elements to set- Returns:
- A modified copy of
this
object
-
equals
This instance is equal to all instances ofImmutableDefaultPdbModel
that have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:atoms
. -
toString
Prints the immutable valueDefaultPdbModel
with attribute values. -
chains
Groups together residues in the same chain and repeat that for every chain.Returns a lazily initialized value of the
chains
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:
chains
in interfacePdbModel
- Overrides:
chains
in classDefaultPdbModel
- Returns:
- A lazily initialized value of the
chains
attribute
-
residues
Groups together atoms from the same residue and repeat that for every residue.Returns a lazily initialized value of the
residues
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:
residues
in interfaceResidueCollection
- Overrides:
residues
in classDefaultPdbModel
- Returns:
- A lazily initialized value of the
residues
attribute
-
of
public static ImmutableDefaultPdbModel of(PdbHeaderLine header, PdbExpdtaLine experimentalData, PdbRemark2Line resolution, int modelNumber, List<PdbAtomLine> atoms, List<PdbModresLine> modifiedResidues, List<PdbRemark465Line> missingResidues, String title, Set<PdbResidueIdentifier> chainTerminatedAfter) Construct a new immutableDefaultPdbModel
instance.- Parameters:
header
- The value for theheader
attributeexperimentalData
- The value for theexperimentalData
attributeresolution
- The value for theresolution
attributemodelNumber
- The value for themodelNumber
attributeatoms
- The value for theatoms
attributemodifiedResidues
- The value for themodifiedResidues
attributemissingResidues
- The value for themissingResidues
attributetitle
- The value for thetitle
attributechainTerminatedAfter
- The value for thechainTerminatedAfter
attribute- Returns:
- An immutable DefaultPdbModel instance
-
of
public static ImmutableDefaultPdbModel of(PdbHeaderLine header, PdbExpdtaLine experimentalData, PdbRemark2Line resolution, int modelNumber, Iterable<? extends PdbAtomLine> atoms, Iterable<? extends PdbModresLine> modifiedResidues, Iterable<? extends PdbRemark465Line> missingResidues, String title, Iterable<? extends PdbResidueIdentifier> chainTerminatedAfter) Construct a new immutableDefaultPdbModel
instance.- Parameters:
header
- The value for theheader
attributeexperimentalData
- The value for theexperimentalData
attributeresolution
- The value for theresolution
attributemodelNumber
- The value for themodelNumber
attributeatoms
- The value for theatoms
attributemodifiedResidues
- The value for themodifiedResidues
attributemissingResidues
- The value for themissingResidues
attributetitle
- The value for thetitle
attributechainTerminatedAfter
- The value for thechainTerminatedAfter
attribute- Returns:
- An immutable DefaultPdbModel instance
-
copyOf
Creates an immutable copy of aDefaultPdbModel
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 DefaultPdbModel instance
-
builder
Creates a builder forImmutableDefaultPdbModel
.ImmutableDefaultPdbModel.builder() .header(pl.poznan.put.pdb.PdbHeaderLine) // required
header
.experimentalData(pl.poznan.put.pdb.PdbExpdtaLine) // requiredexperimentalData
.resolution(pl.poznan.put.pdb.PdbRemark2Line) // requiredresolution
.modelNumber(int) // requiredmodelNumber
.addAtoms|addAllAtoms(pl.poznan.put.pdb.PdbAtomLine) //atoms
elements .addModifiedResidues|addAllModifiedResidues(pl.poznan.put.pdb.PdbModresLine) //modifiedResidues
elements .addMissingResidues|addAllMissingResidues(pl.poznan.put.pdb.PdbRemark465Line) //missingResidues
elements .title(String) // requiredtitle
.addChainTerminatedAfter|addAllChainTerminatedAfter(pl.poznan.put.pdb.PdbResidueIdentifier) //chainTerminatedAfter
elements .build();- Returns:
- A new ImmutableDefaultPdbModel builder
-