Package panda.std

Class Pair<A,B>

java.lang.Object
panda.std.Pair<A,B>

public class Pair<A,B> extends Object
  • Field Details

    • first

      protected final A first
    • second

      protected final B second
  • Constructor Details

    • Pair

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

    • of

      public static <A, B> Pair<A,B> of(A first, B second)
    • add

      public <C> Triple<A,B,C> add(C third)
    • withFirst

      public <R> Pair<R,B> withFirst(R newValue)
    • withSecond

      public <R> Pair<A,R> withSecond(R newValue)
    • getFirst

      public A getFirst()
    • getSecond

      public B getSecond()
    • equals

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

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

      public String toString()
      Overrides:
      toString in class Object