Class Tuple2<A,B>

java.lang.Object
org.apache.juneau.utils.Tuple2<A,B>
Type Parameters:
A - Object 1 type.
B - Object 2 type.

public class Tuple2<A,B> extends Object
Represents a simple tuple of 2 objects.
See Also:
  • Constructor Details

    • Tuple2

      public Tuple2(A a, B b)
      Constructor.
      Parameters:
      a - Object 1.
      b - Object 2.
  • Method Details

    • of

      public static <A, B> Tuple2<A,B> of(A a, B b)
      Static creator.
      Type Parameters:
      A - Object 1 type.
      B - Object 2 type.
      Parameters:
      a - Object 1.
      b - Object 2.
      Returns:
      A new tuple object.
    • getA

      public A getA()
      Returns the first object in this tuple.
      Returns:
      The first object in this tuple.
    • getB

      public B getB()
      Returns the second object in this tuple.
      Returns:
      The second object in this tuple.
    • hashCode

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

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