Class Tuple2<A,B>

java.lang.Object
org.javimmutable.collections.Tuple2<A,B>
All Implemented Interfaces:
Serializable

@Immutable public class Tuple2<A,B> extends Object implements Serializable
Immutable container for 2 values.
See Also:
  • Constructor Details

    • Tuple2

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

    • of

      public static <A, B> Tuple2<A,B> of(A first, B second)
    • 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