Class Tuple<T>
- java.lang.Object
-
- nl.jqno.equalsverifier.internal.prefabvalues.Tuple<T>
-
public final class Tuple<T> extends Object
Container for three values of the same type: a "red" one, a "blue" one, and a shallow copy of the "red" one.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
T
getBlue()
T
getRed()
T
getRedCopy()
int
hashCode()
static <U> Tuple<U>
of(Object red, Object blue, Object redCopy)
Factory method that turns three untyped values into a typed tuple.String
toString()
-
-
-
Method Detail
-
of
public static <U> Tuple<U> of(Object red, Object blue, Object redCopy)
Factory method that turns three untyped values into a typed tuple.- Type Parameters:
U
- The assumed type of the values.- Parameters:
red
- The red value.blue
- The blue value.redCopy
- A shallow copy of the red value.- Returns:
- A typed tuple with the three given values.
-
getRed
public T getRed()
- Returns:
- The red value.
-
getBlue
public T getBlue()
- Returns:
- The blue value.
-
getRedCopy
public T getRedCopy()
- Returns:
- The shallow copy of the red value.
-
-