Class Pair<A,B>

java.lang.Object
org.oristool.util.Pair<A,B>
Type Parameters:
A - type of first element
B - type of second element

public class Pair<A,B> extends Object
Immutable pair of elements.
  • Method Details

    • of

      public static <A, B> Pair<A,B> of(A first, B second)
      Creates a pair of elements.
      Type Parameters:
      A - type of the first element
      B - type of the second element
      Parameters:
      first - first element
      second - second element
      Returns:
      pair of the two input elements
    • first

      public A first()
    • second

      public B second()
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object