Class Pair<T1,T2>

java.lang.Object
org.storynode.pigeon.tuple.Tuple
org.storynode.pigeon.tuple.Pair<T1,T2>
Type Parameters:
T1 - The type of the first element
T2 - The type of the second element

public final class Pair<T1,T2> extends Tuple
Pair class.
Since:
1.0.0
Author:
Andrea Coronese
  • Constructor Details

    • Pair

      public Pair(T1 first, T2 second)
      Constructor for Pair.
      Parameters:
      first - a T1 object
      second - a T2 object
  • Method Details

    • cardinality

      public int cardinality()
    • at

      @NotNull public @NotNull Option<Object> at(int index)
    • first

      public T1 first()
      The first element of the tuple
      Returns:
      The first element
    • second

      public T2 second()
      The second element of the tuple
      Returns:
      The second element
    • hashCode

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

      public String toString()
      Overrides:
      toString in class Object