Class Tuple<T,U>

java.lang.Object
com.terracottatech.store.Tuple<T,U>
Type Parameters:
T - the type of the first value
U - the type of the second value

public final class Tuple<T,U> extends Object
Holds two values. Useful for returning results from an update operation.
  • Method Details

    • of

      public static final <T, U> Tuple<T,U> of(T t, U u)
      Creates a Tuple with two values.
      Type Parameters:
      T - the type of the first value
      U - the type of the second value
      Parameters:
      t - the first value
      u - the second value
      Returns:
      the new Tuple
    • getFirst

      public T getFirst()
      Returns the first value held in the Tuple.
      Returns:
      the first value
    • getSecond

      public U getSecond()
      Returns the second value held in the Tuple.
      Returns:
      the second value
    • first

      public static final <T> BuildableFunction<Tuple<T,?>,T> first()
    • second

      public static final <U> BuildableFunction<Tuple<?,U>,U> second()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object