Class ImmutableDefaultCifModel
- java.lang.Object
-
- pl.poznan.put.pdb.analysis.AbstractPdbModel
-
- pl.poznan.put.pdb.analysis.DefaultCifModel
-
- pl.poznan.put.pdb.analysis.ImmutableDefaultCifModel
-
- All Implemented Interfaces:
Serializable,CifModel,PdbModel,ResidueCollection
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable public final class ImmutableDefaultCifModel extends DefaultCifModel
Immutable implementation ofDefaultCifModel.Use the builder to create immutable instances:
ImmutableDefaultCifModel.builder(). Use the static factory method to create immutable instances:ImmutableDefaultCifModel.of().- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableDefaultCifModel.BuilderBuilds instances of typeImmutableDefaultCifModel.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description List<PdbAtomLine>atoms()List<QuantifiedBasePair>basePairs()static ImmutableDefaultCifModel.Builderbuilder()Creates a builder forImmutableDefaultCifModel.List<PdbChain>chains()Groups together residues in the same chain and repeat that for every chain.Set<PdbResidueIdentifier>chainTerminatedAfter()static ImmutableDefaultCifModelcopyOf(DefaultCifModel instance)Creates an immutable copy of aDefaultCifModelvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableDefaultCifModelthat have equal attribute values.PdbExpdtaLineexperimentalData()inthashCode()Computes a hash code from attributes:atoms.PdbHeaderLineheader()List<PdbRemark465Line>missingResidues()intmodelNumber()List<PdbModresLine>modifiedResidues()static ImmutableDefaultCifModelof(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 immutableDefaultCifModelinstance.static ImmutableDefaultCifModelof(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 immutableDefaultCifModelinstance.List<PdbResidue>residues()Groups together atoms from the same residue and repeat that for every residue.PdbRemark2Lineresolution()Stringtitle()StringtoString()Prints the immutable valueDefaultCifModelwith attribute values.ImmutableDefaultCifModelwithAtoms(Iterable<? extends PdbAtomLine> elements)Copy the current immutable object with elements that replace the content ofatoms.ImmutableDefaultCifModelwithAtoms(PdbAtomLine... elements)Copy the current immutable object with elements that replace the content ofatoms.ImmutableDefaultCifModelwithBasePairs(Iterable<? extends QuantifiedBasePair> elements)Copy the current immutable object with elements that replace the content ofbasePairs.ImmutableDefaultCifModelwithBasePairs(QuantifiedBasePair... elements)Copy the current immutable object with elements that replace the content ofbasePairs.ImmutableDefaultCifModelwithChainTerminatedAfter(Iterable<? extends PdbResidueIdentifier> elements)Copy the current immutable object with elements that replace the content ofchainTerminatedAfter.ImmutableDefaultCifModelwithChainTerminatedAfter(PdbResidueIdentifier... elements)Copy the current immutable object with elements that replace the content ofchainTerminatedAfter.ImmutableDefaultCifModelwithExperimentalData(PdbExpdtaLine value)Copy the current immutable object by setting a value for theexperimentalDataattribute.ImmutableDefaultCifModelwithHeader(PdbHeaderLine value)Copy the current immutable object by setting a value for theheaderattribute.ImmutableDefaultCifModelwithMissingResidues(Iterable<? extends PdbRemark465Line> elements)Copy the current immutable object with elements that replace the content ofmissingResidues.ImmutableDefaultCifModelwithMissingResidues(PdbRemark465Line... elements)Copy the current immutable object with elements that replace the content ofmissingResidues.ImmutableDefaultCifModelwithModelNumber(int value)Copy the current immutable object by setting a value for themodelNumberattribute.ImmutableDefaultCifModelwithModifiedResidues(Iterable<? extends PdbModresLine> elements)Copy the current immutable object with elements that replace the content ofmodifiedResidues.ImmutableDefaultCifModelwithModifiedResidues(PdbModresLine... elements)Copy the current immutable object with elements that replace the content ofmodifiedResidues.ImmutableDefaultCifModelwithResolution(PdbRemark2Line value)Copy the current immutable object by setting a value for theresolutionattribute.ImmutableDefaultCifModelwithTitle(String value)Copy the current immutable object by setting a value for thetitleattribute.-
Methods inherited from class pl.poznan.put.pdb.analysis.DefaultCifModel
filteredNewInstance
-
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 Detail
-
header
public PdbHeaderLine header()
- Specified by:
headerin interfacePdbModel- Specified by:
headerin classDefaultCifModel- Returns:
- The value of the
headerattribute
-
experimentalData
public PdbExpdtaLine experimentalData()
- Specified by:
experimentalDatain interfacePdbModel- Specified by:
experimentalDatain classDefaultCifModel- Returns:
- The value of the
experimentalDataattribute
-
resolution
public PdbRemark2Line resolution()
- Specified by:
resolutionin interfacePdbModel- Specified by:
resolutionin classDefaultCifModel- Returns:
- The value of the
resolutionattribute
-
modelNumber
public int modelNumber()
- Specified by:
modelNumberin interfacePdbModel- Specified by:
modelNumberin classDefaultCifModel- Returns:
- The value of the
modelNumberattribute
-
atoms
public List<PdbAtomLine> atoms()
- Specified by:
atomsin interfacePdbModel- Specified by:
atomsin classDefaultCifModel- Returns:
- The value of the
atomsattribute
-
modifiedResidues
public List<PdbModresLine> modifiedResidues()
- Specified by:
modifiedResiduesin interfacePdbModel- Specified by:
modifiedResiduesin classDefaultCifModel- Returns:
- The value of the
modifiedResiduesattribute
-
missingResidues
public List<PdbRemark465Line> missingResidues()
- Specified by:
missingResiduesin interfacePdbModel- Specified by:
missingResiduesin classDefaultCifModel- Returns:
- The value of the
missingResiduesattribute
-
title
public String title()
- Specified by:
titlein interfacePdbModel- Specified by:
titlein classDefaultCifModel- Returns:
- The value of the
titleattribute
-
chainTerminatedAfter
public Set<PdbResidueIdentifier> chainTerminatedAfter()
- Specified by:
chainTerminatedAfterin interfacePdbModel- Specified by:
chainTerminatedAfterin classDefaultCifModel- Returns:
- The value of the
chainTerminatedAfterattribute
-
basePairs
public List<QuantifiedBasePair> basePairs()
- Specified by:
basePairsin interfaceCifModel- Specified by:
basePairsin classDefaultCifModel- Returns:
- The value of the
basePairsattribute
-
withHeader
public final ImmutableDefaultCifModel withHeader(PdbHeaderLine value)
Copy the current immutable object by setting a value for theheaderattribute. 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
thisobject
-
withExperimentalData
public final ImmutableDefaultCifModel withExperimentalData(PdbExpdtaLine value)
Copy the current immutable object by setting a value for theexperimentalDataattribute. 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
thisobject
-
withResolution
public final ImmutableDefaultCifModel withResolution(PdbRemark2Line value)
Copy the current immutable object by setting a value for theresolutionattribute. 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
thisobject
-
withModelNumber
public final ImmutableDefaultCifModel withModelNumber(int value)
Copy the current immutable object by setting a value for themodelNumberattribute. 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
thisobject
-
withAtoms
public final ImmutableDefaultCifModel withAtoms(PdbAtomLine... elements)
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
public final ImmutableDefaultCifModel withAtoms(Iterable<? extends PdbAtomLine> elements)
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
-
withModifiedResidues
public final ImmutableDefaultCifModel withModifiedResidues(PdbModresLine... elements)
Copy the current immutable object with elements that replace the content ofmodifiedResidues.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
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
thisobject
-
withMissingResidues
public final ImmutableDefaultCifModel withMissingResidues(PdbRemark465Line... elements)
Copy the current immutable object with elements that replace the content ofmissingResidues.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
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
thisobject
-
withTitle
public final ImmutableDefaultCifModel withTitle(String value)
Copy the current immutable object by setting a value for thetitleattribute. 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
thisobject
-
withChainTerminatedAfter
public final ImmutableDefaultCifModel withChainTerminatedAfter(PdbResidueIdentifier... elements)
Copy the current immutable object with elements that replace the content ofchainTerminatedAfter.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
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
thisobject
-
withBasePairs
public final ImmutableDefaultCifModel withBasePairs(QuantifiedBasePair... elements)
Copy the current immutable object with elements that replace the content ofbasePairs.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
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
thisobject
-
equals
public boolean equals(@Nullable Object another)
This instance is equal to all instances ofImmutableDefaultCifModelthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:atoms.
-
toString
public String toString()
Prints the immutable valueDefaultCifModelwith attribute values.
-
chains
public List<PdbChain> chains()
Groups together residues in the same chain and repeat that for every chain.Returns a lazily initialized value of the
chainsattribute. 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:
chainsin interfacePdbModel- Overrides:
chainsin classDefaultCifModel- Returns:
- A lazily initialized value of the
chainsattribute
-
residues
public List<PdbResidue> residues()
Groups together atoms from the same residue and repeat that for every residue.Returns a lazily initialized value of the
residuesattribute. 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:
residuesin interfaceResidueCollection- Overrides:
residuesin classDefaultCifModel- Returns:
- A lazily initialized value of the
residuesattribute
-
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 immutableDefaultCifModelinstance.- Parameters:
header- The value for theheaderattributeexperimentalData- The value for theexperimentalDataattributeresolution- The value for theresolutionattributemodelNumber- The value for themodelNumberattributeatoms- The value for theatomsattributemodifiedResidues- The value for themodifiedResiduesattributemissingResidues- The value for themissingResiduesattributetitle- The value for thetitleattributechainTerminatedAfter- The value for thechainTerminatedAfterattributebasePairs- The value for thebasePairsattribute- 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 immutableDefaultCifModelinstance.- Parameters:
header- The value for theheaderattributeexperimentalData- The value for theexperimentalDataattributeresolution- The value for theresolutionattributemodelNumber- The value for themodelNumberattributeatoms- The value for theatomsattributemodifiedResidues- The value for themodifiedResiduesattributemissingResidues- The value for themissingResiduesattributetitle- The value for thetitleattributechainTerminatedAfter- The value for thechainTerminatedAfterattributebasePairs- The value for thebasePairsattribute- Returns:
- An immutable DefaultCifModel instance
-
copyOf
public static ImmutableDefaultCifModel copyOf(DefaultCifModel instance)
Creates an immutable copy of aDefaultCifModelvalue. 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
public static ImmutableDefaultCifModel.Builder builder()
Creates a builder forImmutableDefaultCifModel.ImmutableDefaultCifModel.builder() .header(pl.poznan.put.pdb.PdbHeaderLine) // requiredheader.experimentalData(pl.poznan.put.pdb.PdbExpdtaLine) // requiredexperimentalData.resolution(pl.poznan.put.pdb.PdbRemark2Line) // requiredresolution.modelNumber(int) // requiredmodelNumber.addAtoms|addAllAtoms(pl.poznan.put.pdb.PdbAtomLine) //atomselements .addModifiedResidues|addAllModifiedResidues(pl.poznan.put.pdb.PdbModresLine) //modifiedResidueselements .addMissingResidues|addAllMissingResidues(pl.poznan.put.pdb.PdbRemark465Line) //missingResidueselements .title(String) // requiredtitle.addChainTerminatedAfter|addAllChainTerminatedAfter(pl.poznan.put.pdb.PdbResidueIdentifier) //chainTerminatedAfterelements .addBasePairs|addAllBasePairs(pl.poznan.put.structure.QuantifiedBasePair) //basePairselements .build();- Returns:
- A new ImmutableDefaultCifModel builder
-
-