Class ImmutablePdbTitleLine

java.lang.Object
pl.poznan.put.pdb.PdbTitleLine
pl.poznan.put.pdb.ImmutablePdbTitleLine
All Implemented Interfaces:
Serializable

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

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

See Also:
  • Method Details

    • continuation

      public String continuation()
      Specified by:
      continuation in class PdbTitleLine
      Returns:
      The value of the continuation attribute
    • title

      public String title()
      Specified by:
      title in class PdbTitleLine
      Returns:
      The value of the title attribute
    • withContinuation

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

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

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

      public static ImmutablePdbTitleLine of(String continuation, String title)
      Construct a new immutable PdbTitleLine instance.
      Parameters:
      continuation - The value for the continuation attribute
      title - The value for the title attribute
      Returns:
      An immutable PdbTitleLine instance
    • copyOf

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

      public static ImmutablePdbTitleLine.Builder builder()
      Creates a builder for ImmutablePdbTitleLine.
       ImmutablePdbTitleLine.builder()
          .continuation(String) // required continuation
          .title(String) // required title
          .build();
       
      Returns:
      A new ImmutablePdbTitleLine builder