Class ImmutablePdbModresLine

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

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

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

See Also:
  • Method Details

    • idCode

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

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

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

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

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

      public String standardResidueName()
      Specified by:
      standardResidueName in class PdbModresLine
      Returns:
      The value of the standardResidueName attribute
    • comment

      public String comment()
      Specified by:
      comment in class PdbModresLine
      Returns:
      The value of the comment attribute
    • withIdCode

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

      public final ImmutablePdbModresLine 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 ImmutablePdbModresLine 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 ImmutablePdbModresLine 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 ImmutablePdbModresLine 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 ImmutablePdbModresLine 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
    • withStandardResidueName

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

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

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

      public static ImmutablePdbModresLine of(String idCode, String residueName, String chainIdentifier, int residueNumber, Optional<String> insertionCode, String standardResidueName, String comment)
      Construct a new immutable PdbModresLine instance.
      Parameters:
      idCode - The value for the idCode 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
      standardResidueName - The value for the standardResidueName attribute
      comment - The value for the comment attribute
      Returns:
      An immutable PdbModresLine instance
    • copyOf

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

      public static ImmutablePdbModresLine.Builder builder()
      Creates a builder for ImmutablePdbModresLine.
       ImmutablePdbModresLine.builder()
          .idCode(String) // required idCode
          .residueName(String) // required residueName
          .chainIdentifier(String) // required chainIdentifier
          .residueNumber(int) // required residueNumber
          .insertionCode(String) // optional insertionCode
          .standardResidueName(String) // required standardResidueName
          .comment(String) // required comment
          .build();
       
      Returns:
      A new ImmutablePdbModresLine builder