Class ImmutableExtendedEntry

java.lang.Object
pl.poznan.put.structure.formats.Ct.ExtendedEntry
pl.poznan.put.structure.formats.ImmutableExtendedEntry
All Implemented Interfaces:
Comparable<Ct.ExtendedEntry>

@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable public final class ImmutableExtendedEntry extends Ct.ExtendedEntry
Immutable implementation of Ct.ExtendedEntry.

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

  • Method Details

    • index

      public int index()
      Specified by:
      index in class Ct.ExtendedEntry
      Returns:
      The value of `index` column.
    • seq

      public char seq()
      Specified by:
      seq in class Ct.ExtendedEntry
      Returns:
      The value of `seq` column.
    • before

      public int before()
      Specified by:
      before in class Ct.ExtendedEntry
      Returns:
      The value of `before` column.
    • after

      public int after()
      Specified by:
      after in class Ct.ExtendedEntry
      Returns:
      The value of `after` column.
    • pair

      public int pair()
      Specified by:
      pair in class Ct.ExtendedEntry
      Returns:
      The value of `pair` column.
    • original

      public int original()
      Specified by:
      original in class Ct.ExtendedEntry
      Returns:
      The value of `original` column.
    • comment

      public String comment()
      Overrides:
      comment in class Ct.ExtendedEntry
      Returns:
      An optional comment.
    • withIndex

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

      public final ImmutableExtendedEntry withSeq(char value)
      Copy the current immutable object by setting a value for the seq attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for seq
      Returns:
      A modified copy of the this object
    • withBefore

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

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

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

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

      public final ImmutableExtendedEntry 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 ImmutableExtendedEntry 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: index, seq, before, after, pair, original, comment.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • of

      public static ImmutableExtendedEntry of(int index, char seq, int before, int after, int pair, int original)
      Construct a new immutable ExtendedEntry instance.
      Parameters:
      index - The value for the index attribute
      seq - The value for the seq attribute
      before - The value for the before attribute
      after - The value for the after attribute
      pair - The value for the pair attribute
      original - The value for the original attribute
      Returns:
      An immutable ExtendedEntry instance
    • copyOf

      public static ImmutableExtendedEntry copyOf(Ct.ExtendedEntry instance)
      Creates an immutable copy of a Ct.ExtendedEntry 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 ExtendedEntry instance
    • builder

      public static ImmutableExtendedEntry.Builder builder()
      Creates a builder for ImmutableExtendedEntry.
       ImmutableExtendedEntry.builder()
          .index(int) // required index
          .seq(char) // required seq
          .before(int) // required before
          .after(int) // required after
          .pair(int) // required pair
          .original(int) // required original
          .comment(String) // optional comment
          .build();
       
      Returns:
      A new ImmutableExtendedEntry builder