Class Pair<A,B>

java.lang.Object
io.deephaven.base.Pair<A,B>
All Implemented Interfaces:
Serializable, Comparable<Pair<A,B>>

public class Pair<A,B> extends Object implements Comparable<Pair<A,B>>, Serializable
A Simple generic pair. Can be used as a compound return value for lambdas.
See Also:
  • Field Details

    • first

      public final A first
    • second

      public final B second
  • Constructor Details

    • Pair

      public Pair(A first, B second)
  • Method Details

    • getFirst

      public A getFirst()
    • getSecond

      public B getSecond()
    • equals

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

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

      public int compareTo(@NotNull @NotNull Pair<A,B> o)
      Specified by:
      compareTo in interface Comparable<A>