Class ImmutableDefaultPdbModel
- java.lang.Object
-
- pl.poznan.put.pdb.analysis.AbstractPdbModel
-
- pl.poznan.put.pdb.analysis.DefaultPdbModel
-
- pl.poznan.put.pdb.analysis.ImmutableDefaultPdbModel
-
- All Implemented Interfaces:
Serializable,PdbModel,ResidueCollection
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable public final class ImmutableDefaultPdbModel extends DefaultPdbModel
Immutable implementation ofDefaultPdbModel.Use the builder to create immutable instances:
ImmutableDefaultPdbModel.builder(). Use the static factory method to create immutable instances:ImmutableDefaultPdbModel.of().- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableDefaultPdbModel.BuilderBuilds instances of typeImmutableDefaultPdbModel.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description List<PdbAtomLine>atoms()static ImmutableDefaultPdbModel.Builderbuilder()Creates a builder forImmutableDefaultPdbModel.List<PdbChain>chains()Groups together residues in the same chain and repeat that for every chain.Set<PdbResidueIdentifier>chainTerminatedAfter()static ImmutableDefaultPdbModelcopyOf(DefaultPdbModel instance)Creates an immutable copy of aDefaultPdbModelvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableDefaultPdbModelthat have equal attribute values.PdbExpdtaLineexperimentalData()inthashCode()Computes a hash code from attributes:atoms.PdbHeaderLineheader()List<PdbRemark465Line>missingResidues()intmodelNumber()List<PdbModresLine>modifiedResidues()static ImmutableDefaultPdbModelof(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 immutableDefaultPdbModelinstance.static ImmutableDefaultPdbModelof(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 immutableDefaultPdbModelinstance.List<PdbResidue>residues()Groups together atoms from the same residue and repeat that for every residue.PdbRemark2Lineresolution()Stringtitle()StringtoString()Prints the immutable valueDefaultPdbModelwith attribute values.ImmutableDefaultPdbModelwithAtoms(Iterable<? extends PdbAtomLine> elements)Copy the current immutable object with elements that replace the content ofatoms.ImmutableDefaultPdbModelwithAtoms(PdbAtomLine... elements)Copy the current immutable object with elements that replace the content ofatoms.ImmutableDefaultPdbModelwithChainTerminatedAfter(Iterable<? extends PdbResidueIdentifier> elements)Copy the current immutable object with elements that replace the content ofchainTerminatedAfter.ImmutableDefaultPdbModelwithChainTerminatedAfter(PdbResidueIdentifier... elements)Copy the current immutable object with elements that replace the content ofchainTerminatedAfter.ImmutableDefaultPdbModelwithExperimentalData(PdbExpdtaLine value)Copy the current immutable object by setting a value for theexperimentalDataattribute.ImmutableDefaultPdbModelwithHeader(PdbHeaderLine value)Copy the current immutable object by setting a value for theheaderattribute.ImmutableDefaultPdbModelwithMissingResidues(Iterable<? extends PdbRemark465Line> elements)Copy the current immutable object with elements that replace the content ofmissingResidues.ImmutableDefaultPdbModelwithMissingResidues(PdbRemark465Line... elements)Copy the current immutable object with elements that replace the content ofmissingResidues.ImmutableDefaultPdbModelwithModelNumber(int value)Copy the current immutable object by setting a value for themodelNumberattribute.ImmutableDefaultPdbModelwithModifiedResidues(Iterable<? extends PdbModresLine> elements)Copy the current immutable object with elements that replace the content ofmodifiedResidues.ImmutableDefaultPdbModelwithModifiedResidues(PdbModresLine... elements)Copy the current immutable object with elements that replace the content ofmodifiedResidues.ImmutableDefaultPdbModelwithResolution(PdbRemark2Line value)Copy the current immutable object by setting a value for theresolutionattribute.ImmutableDefaultPdbModelwithTitle(String value)Copy the current immutable object by setting a value for thetitleattribute.-
Methods inherited from class pl.poznan.put.pdb.analysis.DefaultPdbModel
check, filteredNewInstance, 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 Detail
-
header
public PdbHeaderLine header()
- Specified by:
headerin interfacePdbModel- Specified by:
headerin classDefaultPdbModel- Returns:
- The value of the
headerattribute
-
experimentalData
public PdbExpdtaLine experimentalData()
- Specified by:
experimentalDatain interfacePdbModel- Specified by:
experimentalDatain classDefaultPdbModel- Returns:
- The value of the
experimentalDataattribute
-
resolution
public PdbRemark2Line resolution()
- Specified by:
resolutionin interfacePdbModel- Specified by:
resolutionin classDefaultPdbModel- Returns:
- The value of the
resolutionattribute
-
modelNumber
public int modelNumber()
- Specified by:
modelNumberin interfacePdbModel- Specified by:
modelNumberin classDefaultPdbModel- Returns:
- The value of the
modelNumberattribute
-
atoms
public List<PdbAtomLine> atoms()
- Specified by:
atomsin interfacePdbModel- Specified by:
atomsin classDefaultPdbModel- Returns:
- The value of the
atomsattribute
-
modifiedResidues
public List<PdbModresLine> modifiedResidues()
- Specified by:
modifiedResiduesin interfacePdbModel- Specified by:
modifiedResiduesin classDefaultPdbModel- Returns:
- The value of the
modifiedResiduesattribute
-
missingResidues
public List<PdbRemark465Line> missingResidues()
- Specified by:
missingResiduesin interfacePdbModel- Specified by:
missingResiduesin classDefaultPdbModel- Returns:
- The value of the
missingResiduesattribute
-
title
public String title()
- Specified by:
titlein interfacePdbModel- Specified by:
titlein classDefaultPdbModel- Returns:
- The value of the
titleattribute
-
chainTerminatedAfter
public Set<PdbResidueIdentifier> chainTerminatedAfter()
- Specified by:
chainTerminatedAfterin interfacePdbModel- Specified by:
chainTerminatedAfterin classDefaultPdbModel- Returns:
- The value of the
chainTerminatedAfterattribute
-
withHeader
public final ImmutableDefaultPdbModel 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 ImmutableDefaultPdbModel 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 ImmutableDefaultPdbModel 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 ImmutableDefaultPdbModel 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 ImmutableDefaultPdbModel 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 ImmutableDefaultPdbModel 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 ImmutableDefaultPdbModel 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 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
thisobject
-
withMissingResidues
public final ImmutableDefaultPdbModel 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 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
thisobject
-
withTitle
public final ImmutableDefaultPdbModel 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 ImmutableDefaultPdbModel 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 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
thisobject
-
equals
public boolean equals(@Nullable Object another)
This instance is equal to all instances ofImmutableDefaultPdbModelthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:atoms.
-
toString
public String toString()
Prints the immutable valueDefaultPdbModelwith 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 classDefaultPdbModel- 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 classDefaultPdbModel- Returns:
- A lazily initialized value of the
residuesattribute
-
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 immutableDefaultPdbModelinstance.- 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 thechainTerminatedAfterattribute- 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 immutableDefaultPdbModelinstance.- 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 thechainTerminatedAfterattribute- Returns:
- An immutable DefaultPdbModel instance
-
copyOf
public static ImmutableDefaultPdbModel copyOf(DefaultPdbModel instance)
Creates an immutable copy of aDefaultPdbModelvalue. 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
public static ImmutableDefaultPdbModel.Builder builder()
Creates a builder forImmutableDefaultPdbModel.ImmutableDefaultPdbModel.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 .build();- Returns:
- A new ImmutableDefaultPdbModel builder
-
-