Class ImmutableDefaultCifModel

All Implemented Interfaces:
Serializable, CifModel, PdbModel, ResidueCollection

@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable public final class ImmutableDefaultCifModel extends DefaultCifModel
Immutable implementation of DefaultCifModel.

Use the builder to create immutable instances: ImmutableDefaultCifModel.builder(). Use the static factory method to create immutable instances: ImmutableDefaultCifModel.of().

See Also:
  • Method Details

    • header

      public PdbHeaderLine header()
      Specified by:
      header in interface PdbModel
      Specified by:
      header in class DefaultCifModel
      Returns:
      The value of the header attribute
    • experimentalData

      public PdbExpdtaLine experimentalData()
      Specified by:
      experimentalData in interface PdbModel
      Specified by:
      experimentalData in class DefaultCifModel
      Returns:
      The value of the experimentalData attribute
    • resolution

      public PdbRemark2Line resolution()
      Specified by:
      resolution in interface PdbModel
      Specified by:
      resolution in class DefaultCifModel
      Returns:
      The value of the resolution attribute
    • modelNumber

      public int modelNumber()
      Specified by:
      modelNumber in interface PdbModel
      Specified by:
      modelNumber in class DefaultCifModel
      Returns:
      The value of the modelNumber attribute
    • atoms

      public List<PdbAtomLine> atoms()
      Specified by:
      atoms in interface PdbModel
      Specified by:
      atoms in class DefaultCifModel
      Returns:
      The value of the atoms attribute
    • modifiedResidues

      public List<PdbModresLine> modifiedResidues()
      Specified by:
      modifiedResidues in interface PdbModel
      Specified by:
      modifiedResidues in class DefaultCifModel
      Returns:
      The value of the modifiedResidues attribute
    • missingResidues

      public List<PdbRemark465Line> missingResidues()
      Specified by:
      missingResidues in interface PdbModel
      Specified by:
      missingResidues in class DefaultCifModel
      Returns:
      The value of the missingResidues attribute
    • title

      public String title()
      Specified by:
      title in interface PdbModel
      Specified by:
      title in class DefaultCifModel
      Returns:
      The value of the title attribute
    • chainTerminatedAfter

      public Set<PdbResidueIdentifier> chainTerminatedAfter()
      Specified by:
      chainTerminatedAfter in interface PdbModel
      Specified by:
      chainTerminatedAfter in class DefaultCifModel
      Returns:
      The value of the chainTerminatedAfter attribute
    • basePairs

      public List<QuantifiedBasePair> basePairs()
      Specified by:
      basePairs in interface CifModel
      Specified by:
      basePairs in class DefaultCifModel
      Returns:
      The value of the basePairs attribute
    • withHeader

      public final ImmutableDefaultCifModel withHeader(PdbHeaderLine value)
      Copy the current immutable object by setting a value for the header attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for header
      Returns:
      A modified copy of the this object
    • withExperimentalData

      public final ImmutableDefaultCifModel withExperimentalData(PdbExpdtaLine value)
      Copy the current immutable object by setting a value for the experimentalData attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for experimentalData
      Returns:
      A modified copy of the this object
    • withResolution

      public final ImmutableDefaultCifModel withResolution(PdbRemark2Line value)
      Copy the current immutable object by setting a value for the resolution attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for resolution
      Returns:
      A modified copy of the this object
    • withModelNumber

      public final ImmutableDefaultCifModel withModelNumber(int value)
      Copy the current immutable object by setting a value for the modelNumber attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for modelNumber
      Returns:
      A modified copy of the this object
    • withAtoms

      public final ImmutableDefaultCifModel withAtoms(PdbAtomLine... elements)
      Copy the current immutable object with elements that replace the content of atoms.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withAtoms

      public final ImmutableDefaultCifModel withAtoms(Iterable<? extends PdbAtomLine> elements)
      Copy the current immutable object with elements that replace the content of atoms. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of atoms elements to set
      Returns:
      A modified copy of this object
    • withModifiedResidues

      public final ImmutableDefaultCifModel withModifiedResidues(PdbModresLine... elements)
      Copy the current immutable object with elements that replace the content of modifiedResidues.
      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 of modifiedResidues. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of modifiedResidues elements to set
      Returns:
      A modified copy of this object
    • withMissingResidues

      public final ImmutableDefaultCifModel withMissingResidues(PdbRemark465Line... elements)
      Copy the current immutable object with elements that replace the content of missingResidues.
      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 of missingResidues. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of missingResidues elements to set
      Returns:
      A modified copy of this object
    • withTitle

      public final ImmutableDefaultCifModel withTitle(String value)
      Copy the current immutable object by setting a value for the title attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for title
      Returns:
      A modified copy of the this object
    • withChainTerminatedAfter

      public final ImmutableDefaultCifModel withChainTerminatedAfter(PdbResidueIdentifier... elements)
      Copy the current immutable object with elements that replace the content of chainTerminatedAfter.
      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 of chainTerminatedAfter. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of chainTerminatedAfter elements to set
      Returns:
      A modified copy of this object
    • withBasePairs

      public final ImmutableDefaultCifModel withBasePairs(QuantifiedBasePair... elements)
      Copy the current immutable object with elements that replace the content of basePairs.
      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 of basePairs. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of basePairs elements to set
      Returns:
      A modified copy of this object
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ImmutableDefaultCifModel that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: atoms.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value DefaultCifModel with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • 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 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 interface PdbModel
      Overrides:
      chains in class DefaultCifModel
      Returns:
      A lazily initialized value of the chains attribute
    • 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 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 interface ResidueCollection
      Overrides:
      residues in class DefaultCifModel
      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 immutable DefaultCifModel instance.
      Parameters:
      header - The value for the header attribute
      experimentalData - The value for the experimentalData attribute
      resolution - The value for the resolution attribute
      modelNumber - The value for the modelNumber attribute
      atoms - The value for the atoms attribute
      modifiedResidues - The value for the modifiedResidues attribute
      missingResidues - The value for the missingResidues attribute
      title - The value for the title attribute
      chainTerminatedAfter - The value for the chainTerminatedAfter attribute
      basePairs - The value for the basePairs 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 immutable DefaultCifModel instance.
      Parameters:
      header - The value for the header attribute
      experimentalData - The value for the experimentalData attribute
      resolution - The value for the resolution attribute
      modelNumber - The value for the modelNumber attribute
      atoms - The value for the atoms attribute
      modifiedResidues - The value for the modifiedResidues attribute
      missingResidues - The value for the missingResidues attribute
      title - The value for the title attribute
      chainTerminatedAfter - The value for the chainTerminatedAfter attribute
      basePairs - The value for the basePairs attribute
      Returns:
      An immutable DefaultCifModel instance
    • copyOf

      public static ImmutableDefaultCifModel copyOf(DefaultCifModel instance)
      Creates an immutable copy of a DefaultCifModel 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

      public static ImmutableDefaultCifModel.Builder builder()
      Creates a builder for ImmutableDefaultCifModel.
       ImmutableDefaultCifModel.builder()
          .header(pl.poznan.put.pdb.PdbHeaderLine) // required header
          .experimentalData(pl.poznan.put.pdb.PdbExpdtaLine) // required experimentalData
          .resolution(pl.poznan.put.pdb.PdbRemark2Line) // required resolution
          .modelNumber(int) // required modelNumber
          .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) // required title
          .addChainTerminatedAfter|addAllChainTerminatedAfter(pl.poznan.put.pdb.PdbResidueIdentifier) // chainTerminatedAfter elements
          .addBasePairs|addAllBasePairs(pl.poznan.put.structure.QuantifiedBasePair) // basePairs elements
          .build();
       
      Returns:
      A new ImmutableDefaultCifModel builder