Class Tuple2<A,B>

java.lang.Object
org.fuchss.tools.tuple.Tuple2<A,B>
Type Parameters:
A - the first type
B - the second type
All Implemented Interfaces:
Serializable

public final class Tuple2<A,B> extends Object implements Serializable
A simple tuple of two values
Author:
Dominik Fuchss
See Also:
  • Method Details

    • of

      public static <A, B> Tuple2<A,B> of(A first, B second)
    • getFirst

      public A getFirst()
      The first value.
      Returns:
      the first value
    • getSecond

      public B getSecond()
      The second value.
      Returns:
      the second value
    • hashCode

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

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object