Package com.terracottatech.store
Class Tuple<T,U>
java.lang.Object
com.terracottatech.store.Tuple<T,U>
- Type Parameters:
T- the type of the first valueU- the type of the second value
Holds two values. Useful for returning results from an update operation.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic final <T> BuildableFunction<Tuple<T,?>, T> first()getFirst()Returns the first value held in the Tuple.Returns the second value held in the Tuple.inthashCode()static final <T,U> Tuple<T, U> of(T t, U u) Creates a Tuple with two values.static final <U> BuildableFunction<Tuple<?,U>, U> second()toString()
-
Method Details
-
of
Creates a Tuple with two values.- Type Parameters:
T- the type of the first valueU- the type of the second value- Parameters:
t- the first valueu- the second value- Returns:
- the new Tuple
-
getFirst
Returns the first value held in the Tuple.- Returns:
- the first value
-
getSecond
Returns the second value held in the Tuple.- Returns:
- the second value
-
first
-
second
-
toString
-
equals
-
hashCode
public int hashCode()
-