Class ImmutablePdbHeaderLine

java.lang.Object
pl.poznan.put.pdb.PdbHeaderLine
pl.poznan.put.pdb.ImmutablePdbHeaderLine
All Implemented Interfaces:
Serializable

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

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

See Also:
  • Method Details

    • classification

      public String classification()
      Specified by:
      classification in class PdbHeaderLine
      Returns:
      The value of the classification attribute
    • depositionDate

      public Date depositionDate()
      Specified by:
      depositionDate in class PdbHeaderLine
      Returns:
      The value of the depositionDate attribute
    • idCode

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

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

      public final ImmutablePdbHeaderLine withDepositionDate(Date value)
      Copy the current immutable object by setting a value for the depositionDate attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for depositionDate
      Returns:
      A modified copy of the this object
    • withIdCode

      public final ImmutablePdbHeaderLine 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
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ImmutablePdbHeaderLine 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: classification, depositionDate, idCode.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • of

      public static ImmutablePdbHeaderLine of(String classification, Date depositionDate, String idCode)
      Construct a new immutable PdbHeaderLine instance.
      Parameters:
      classification - The value for the classification attribute
      depositionDate - The value for the depositionDate attribute
      idCode - The value for the idCode attribute
      Returns:
      An immutable PdbHeaderLine instance
    • copyOf

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

      public static ImmutablePdbHeaderLine.Builder builder()
      Creates a builder for ImmutablePdbHeaderLine.
       ImmutablePdbHeaderLine.builder()
          .classification(String) // required classification
          .depositionDate(Date) // required depositionDate
          .idCode(String) // required idCode
          .build();
       
      Returns:
      A new ImmutablePdbHeaderLine builder