Class ImmutablePdbAtomLine

java.lang.Object
pl.poznan.put.pdb.PdbAtomLine
pl.poznan.put.pdb.ImmutablePdbAtomLine
All Implemented Interfaces:
Serializable, Comparable<ChainNumberICode>, ChainNumberICode

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

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

See Also:
  • Method Details

    • serialNumber

      public int serialNumber()
      Specified by:
      serialNumber in class PdbAtomLine
      Returns:
      The value of the serialNumber attribute
    • atomName

      public String atomName()
      Specified by:
      atomName in class PdbAtomLine
      Returns:
      The value of the atomName attribute
    • alternateLocation

      public Optional<String> alternateLocation()
      Specified by:
      alternateLocation in class PdbAtomLine
      Returns:
      The value of the alternateLocation attribute
    • residueName

      public String residueName()
      Specified by:
      residueName in class PdbAtomLine
      Returns:
      The value of the residueName attribute
    • chainIdentifier

      public String chainIdentifier()
      Specified by:
      chainIdentifier in interface ChainNumberICode
      Specified by:
      chainIdentifier in class PdbAtomLine
      Returns:
      The value of the chainIdentifier attribute
    • residueNumber

      public int residueNumber()
      Specified by:
      residueNumber in interface ChainNumberICode
      Specified by:
      residueNumber in class PdbAtomLine
      Returns:
      The value of the residueNumber attribute
    • insertionCode

      public Optional<String> insertionCode()
      Specified by:
      insertionCode in interface ChainNumberICode
      Specified by:
      insertionCode in class PdbAtomLine
      Returns:
      The value of the insertionCode attribute
    • x

      public double x()
      Specified by:
      x in class PdbAtomLine
      Returns:
      The value of the x attribute
    • y

      public double y()
      Specified by:
      y in class PdbAtomLine
      Returns:
      The value of the y attribute
    • z

      public double z()
      Specified by:
      z in class PdbAtomLine
      Returns:
      The value of the z attribute
    • occupancy

      public double occupancy()
      Specified by:
      occupancy in class PdbAtomLine
      Returns:
      The value of the occupancy attribute
    • temperatureFactor

      public double temperatureFactor()
      Specified by:
      temperatureFactor in class PdbAtomLine
      Returns:
      The value of the temperatureFactor attribute
    • elementSymbol

      public String elementSymbol()
      Specified by:
      elementSymbol in class PdbAtomLine
      Returns:
      The value of the elementSymbol attribute
    • charge

      public String charge()
      Specified by:
      charge in class PdbAtomLine
      Returns:
      The value of the charge attribute
    • withSerialNumber

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

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

      public final ImmutablePdbAtomLine withAlternateLocation(String value)
      Copy the current immutable object by setting a present value for the optional alternateLocation attribute.
      Parameters:
      value - The value for alternateLocation
      Returns:
      A modified copy of this object
    • withAlternateLocation

      public final ImmutablePdbAtomLine withAlternateLocation(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the alternateLocation attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for alternateLocation
      Returns:
      A modified copy of this object
    • withResidueName

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

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

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

      public final ImmutablePdbAtomLine withInsertionCode(String value)
      Copy the current immutable object by setting a present value for the optional insertionCode attribute.
      Parameters:
      value - The value for insertionCode
      Returns:
      A modified copy of this object
    • withInsertionCode

      public final ImmutablePdbAtomLine withInsertionCode(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the insertionCode attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for insertionCode
      Returns:
      A modified copy of this object
    • withX

      public final ImmutablePdbAtomLine withX(double value)
      Copy the current immutable object by setting a value for the x attribute. A value strict bits equality used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for x
      Returns:
      A modified copy of the this object
    • withY

      public final ImmutablePdbAtomLine withY(double value)
      Copy the current immutable object by setting a value for the y attribute. A value strict bits equality used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for y
      Returns:
      A modified copy of the this object
    • withZ

      public final ImmutablePdbAtomLine withZ(double value)
      Copy the current immutable object by setting a value for the z attribute. A value strict bits equality used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for z
      Returns:
      A modified copy of the this object
    • withOccupancy

      public final ImmutablePdbAtomLine withOccupancy(double value)
      Copy the current immutable object by setting a value for the occupancy attribute. A value strict bits equality used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for occupancy
      Returns:
      A modified copy of the this object
    • withTemperatureFactor

      public final ImmutablePdbAtomLine withTemperatureFactor(double value)
      Copy the current immutable object by setting a value for the temperatureFactor attribute. A value strict bits equality used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for temperatureFactor
      Returns:
      A modified copy of the this object
    • withElementSymbol

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

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

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ImmutablePdbAtomLine 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: atomName, residueName, chainIdentifier, residueNumber, insertionCode, x, y, z.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • of

      public static ImmutablePdbAtomLine of(int serialNumber, String atomName, Optional<String> alternateLocation, String residueName, String chainIdentifier, int residueNumber, Optional<String> insertionCode, double x, double y, double z, double occupancy, double temperatureFactor, String elementSymbol, String charge)
      Construct a new immutable PdbAtomLine instance.
      Parameters:
      serialNumber - The value for the serialNumber attribute
      atomName - The value for the atomName attribute
      alternateLocation - The value for the alternateLocation attribute
      residueName - The value for the residueName attribute
      chainIdentifier - The value for the chainIdentifier attribute
      residueNumber - The value for the residueNumber attribute
      insertionCode - The value for the insertionCode attribute
      x - The value for the x attribute
      y - The value for the y attribute
      z - The value for the z attribute
      occupancy - The value for the occupancy attribute
      temperatureFactor - The value for the temperatureFactor attribute
      elementSymbol - The value for the elementSymbol attribute
      charge - The value for the charge attribute
      Returns:
      An immutable PdbAtomLine instance
    • copyOf

      public static ImmutablePdbAtomLine copyOf(PdbAtomLine instance)
      Creates an immutable copy of a PdbAtomLine 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 PdbAtomLine instance
    • builder

      public static ImmutablePdbAtomLine.Builder builder()
      Creates a builder for ImmutablePdbAtomLine.
       ImmutablePdbAtomLine.builder()
          .serialNumber(int) // required serialNumber
          .atomName(String) // required atomName
          .alternateLocation(String) // optional alternateLocation
          .residueName(String) // required residueName
          .chainIdentifier(String) // required chainIdentifier
          .residueNumber(int) // required residueNumber
          .insertionCode(String) // optional insertionCode
          .x(double) // required x
          .y(double) // required y
          .z(double) // required z
          .occupancy(double) // required occupancy
          .temperatureFactor(double) // required temperatureFactor
          .elementSymbol(String) // required elementSymbol
          .charge(String) // required charge
          .build();
       
      Returns:
      A new ImmutablePdbAtomLine builder