Class ImmutablePair

java.lang.Object
pl.poznan.put.external.dssr.ImmutablePair
All Implemented Interfaces:
Pair

@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable public final class ImmutablePair extends Object implements Pair
Immutable implementation of Pair.

Use the builder to create immutable instances: ImmutablePair.builder().

  • Method Details

    • nt1

      public String nt1()
      Specified by:
      nt1 in interface Pair
      Returns:
      The value of the nt1 attribute
    • nt2

      public String nt2()
      Specified by:
      nt2 in interface Pair
      Returns:
      The value of the nt2 attribute
    • saenger

      public String saenger()
      Specified by:
      saenger in interface Pair
      Returns:
      The value of the saenger attribute
    • lw

      public String lw()
      Specified by:
      lw in interface Pair
      Returns:
      The value of the lw attribute
    • withNt1

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

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

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

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

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ImmutablePair 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: nt1, nt2, saenger, lw.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value Pair with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • copyOf

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

      public static ImmutablePair.Builder builder()
      Creates a builder for ImmutablePair.
       ImmutablePair.builder()
          .nt1(String) // required nt1
          .nt2(String) // required nt2
          .saenger(String) // required saenger
          .lw(String) // required lw
          .build();
       
      Returns:
      A new ImmutablePair builder