Class ImmutableDefaultCifModel
- All Implemented Interfaces:
Serializable
,CifModel
,PdbModel
,ResidueCollection
DefaultCifModel
.
Use the builder to create immutable instances:
ImmutableDefaultCifModel.builder()
.
Use the static factory method to create immutable instances:
ImmutableDefaultCifModel.of()
.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
Builds instances of typeImmutableDefaultCifModel
.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 forImmutableDefaultCifModel
.chains()
Groups together residues in the same chain and repeat that for every chain.static ImmutableDefaultCifModel
copyOf
(DefaultCifModel instance) Creates an immutable copy of aDefaultCifModel
value.boolean
This instance is equal to all instances ofImmutableDefaultCifModel
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:atoms
.header()
int
static ImmutableDefaultCifModel
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, Iterable<? extends QuantifiedBasePair> basePairs) Construct a new immutableDefaultCifModel
instance.static ImmutableDefaultCifModel
of
(PdbHeaderLine header, PdbExpdtaLine experimentalData, PdbRemark2Line resolution, int modelNumber, List<PdbAtomLine> atoms, List<PdbModresLine> modifiedResidues, List<PdbRemark465Line> missingResidues, String title, Set<PdbResidueIdentifier> chainTerminatedAfter, List<QuantifiedBasePair> basePairs) Construct a new immutableDefaultCifModel
instance.residues()
Groups together atoms from the same residue and repeat that for every residue.title()
toString()
Prints the immutable valueDefaultCifModel
with attribute values.final ImmutableDefaultCifModel
withAtoms
(Iterable<? extends PdbAtomLine> elements) Copy the current immutable object with elements that replace the content ofatoms
.final ImmutableDefaultCifModel
withAtoms
(PdbAtomLine... elements) Copy the current immutable object with elements that replace the content ofatoms
.final ImmutableDefaultCifModel
withBasePairs
(Iterable<? extends QuantifiedBasePair> elements) Copy the current immutable object with elements that replace the content ofbasePairs
.final ImmutableDefaultCifModel
withBasePairs
(QuantifiedBasePair... elements) Copy the current immutable object with elements that replace the content ofbasePairs
.final ImmutableDefaultCifModel
withChainTerminatedAfter
(Iterable<? extends PdbResidueIdentifier> elements) Copy the current immutable object with elements that replace the content ofchainTerminatedAfter
.final ImmutableDefaultCifModel
withChainTerminatedAfter
(PdbResidueIdentifier... elements) Copy the current immutable object with elements that replace the content ofchainTerminatedAfter
.final ImmutableDefaultCifModel
Copy the current immutable object by setting a value for theexperimentalData
attribute.final ImmutableDefaultCifModel
withHeader
(PdbHeaderLine value) Copy the current immutable object by setting a value for theheader
attribute.final ImmutableDefaultCifModel
withMissingResidues
(Iterable<? extends PdbRemark465Line> elements) Copy the current immutable object with elements that replace the content ofmissingResidues
.final ImmutableDefaultCifModel
withMissingResidues
(PdbRemark465Line... elements) Copy the current immutable object with elements that replace the content ofmissingResidues
.final ImmutableDefaultCifModel
withModelNumber
(int value) Copy the current immutable object by setting a value for themodelNumber
attribute.final ImmutableDefaultCifModel
withModifiedResidues
(Iterable<? extends PdbModresLine> elements) Copy the current immutable object with elements that replace the content ofmodifiedResidues
.final ImmutableDefaultCifModel
withModifiedResidues
(PdbModresLine... elements) Copy the current immutable object with elements that replace the content ofmodifiedResidues
.final ImmutableDefaultCifModel
withResolution
(PdbRemark2Line value) Copy the current immutable object by setting a value for theresolution
attribute.final ImmutableDefaultCifModel
Copy the current immutable object by setting a value for thetitle
attribute.Methods inherited from class pl.poznan.put.pdb.analysis.DefaultCifModel
filteredNewInstance, normalize
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 classDefaultCifModel
- Returns:
- The value of the
header
attribute
-
experimentalData
- Specified by:
experimentalData
in interfacePdbModel
- Specified by:
experimentalData
in classDefaultCifModel
- Returns:
- The value of the
experimentalData
attribute
-
resolution
- Specified by:
resolution
in interfacePdbModel
- Specified by:
resolution
in classDefaultCifModel
- Returns:
- The value of the
resolution
attribute
-
modelNumber
public int modelNumber()- Specified by:
modelNumber
in interfacePdbModel
- Specified by:
modelNumber
in classDefaultCifModel
- Returns:
- The value of the
modelNumber
attribute
-
atoms
- Specified by:
atoms
in interfacePdbModel
- Specified by:
atoms
in classDefaultCifModel
- Returns:
- The value of the
atoms
attribute
-
modifiedResidues
- Specified by:
modifiedResidues
in interfacePdbModel
- Specified by:
modifiedResidues
in classDefaultCifModel
- Returns:
- The value of the
modifiedResidues
attribute
-
missingResidues
- Specified by:
missingResidues
in interfacePdbModel
- Specified by:
missingResidues
in classDefaultCifModel
- Returns:
- The value of the
missingResidues
attribute
-
title
- Specified by:
title
in interfacePdbModel
- Specified by:
title
in classDefaultCifModel
- Returns:
- The value of the
title
attribute
-
chainTerminatedAfter
- Specified by:
chainTerminatedAfter
in interfacePdbModel
- Specified by:
chainTerminatedAfter
in classDefaultCifModel
- Returns:
- The value of the
chainTerminatedAfter
attribute
-
basePairs
- Specified by:
basePairs
in interfaceCifModel
- Specified by:
basePairs
in classDefaultCifModel
- Returns:
- The value of the
basePairs
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 ImmutableDefaultCifModel 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 ImmutableDefaultCifModel 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 ImmutableDefaultCifModel 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
-
withBasePairs
Copy the current immutable object with elements that replace the content ofbasePairs
.- Parameters:
elements
- The elements to set- Returns:
- A modified copy of
this
object
-
withBasePairs
public final ImmutableDefaultCifModel withBasePairs(Iterable<? extends QuantifiedBasePair> elements) Copy the current immutable object with elements that replace the content ofbasePairs
. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
elements
- An iterable of basePairs elements to set- Returns:
- A modified copy of
this
object
-
equals
This instance is equal to all instances ofImmutableDefaultCifModel
that have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:atoms
. -
toString
Prints the immutable valueDefaultCifModel
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 classDefaultCifModel
- 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 classDefaultCifModel
- Returns:
- A lazily initialized value of the
residues
attribute
-
of
public static ImmutableDefaultCifModel of(PdbHeaderLine header, PdbExpdtaLine experimentalData, PdbRemark2Line resolution, int modelNumber, List<PdbAtomLine> atoms, List<PdbModresLine> modifiedResidues, List<PdbRemark465Line> missingResidues, String title, Set<PdbResidueIdentifier> chainTerminatedAfter, List<QuantifiedBasePair> basePairs) Construct a new immutableDefaultCifModel
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
attributebasePairs
- The value for thebasePairs
attribute- Returns:
- An immutable DefaultCifModel instance
-
of
public static ImmutableDefaultCifModel 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, Iterable<? extends QuantifiedBasePair> basePairs) Construct a new immutableDefaultCifModel
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
attributebasePairs
- The value for thebasePairs
attribute- Returns:
- An immutable DefaultCifModel instance
-
copyOf
Creates an immutable copy of aDefaultCifModel
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 DefaultCifModel instance
-
builder
Creates a builder forImmutableDefaultCifModel
.ImmutableDefaultCifModel.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 .addBasePairs|addAllBasePairs(pl.poznan.put.structure.QuantifiedBasePair) //basePairs
elements .build();- Returns:
- A new ImmutableDefaultCifModel builder
-