Class Pair<A,B>

java.lang.Object
net.sf.jailer.util.Pair<A,B>
All Implemented Interfaces:
Serializable

public class Pair<A,B> extends Object implements Serializable
An ordered pair of objects (a, b). (a1, b1).equals(a2, b2) iff (a1 == null invalid input: '&'invalid input: '&' a2 == null || a1.equals(a2)) invalid input: '&'invalid input: '&' (b1 == null invalid input: '&'invalid input: '&' b2 == null || b1.equals(b2))
Author:
Ralf Wisser
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    final A
    The a object.
    final B
    The b object.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Pair(A a, B b)
    New Pair (a, b).
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    equals(Object other)
    Compares two pairs.
    int
    Hashes a pair.
    Gets string representation of a pair.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • a

      public final A a
      The a object.
    • b

      public final B b
      The b object.
  • Constructor Details

    • Pair

      public Pair(A a, B b)
      New Pair (a, b).
      Parameters:
      a - the a object
      b - the b object
  • Method Details

    • equals

      public boolean equals(Object other)
      Compares two pairs.
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Hashes a pair.
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Gets string representation of a pair.
      Overrides:
      toString in class Object