Class Tuple2<T1,T2>

java.lang.Object
org.hawaiiframework.util.tuple.Tuple1<T1>
org.hawaiiframework.util.tuple.Tuple2<T1,T2>
Type Parameters:
T1 - the type of the 1st element
T2 - the type of the 2nd element
All Implemented Interfaces:
Tuple
Direct Known Subclasses:
Tuple3

public class Tuple2<T1,T2> extends Tuple1<T1>
A Tuple of 2 elements.
Since:
2.0.0
  • Constructor Details

    • Tuple2

      public Tuple2(T1 element1, T2 element2)
      Constructs a new Tuple with the supplied elements.
  • Method Details

    • getElement2

      public T2 getElement2()
      Returns the 2nd element of this tuple.
      Returns:
      the 2nd element of this tuple
    • setElement2

      public void setElement2(T2 element2)
      Sets the 2nd element of this tuple.
    • size

      public int size()
      Description copied from interface: Tuple
      Returns the number of elements of this tuple.
      Specified by:
      size in interface Tuple
      Overrides:
      size in class Tuple1<T1>
      Returns:
      the number of elements of this tuple
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Tuple1<T1>
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Tuple1<T1>