Package org.incendo.cloud.type.tuple
Class Pair<U,V>
java.lang.Object
org.incendo.cloud.type.tuple.Pair<U,V>
- Type Parameters:
U- First typeV- Second type
- All Implemented Interfaces:
Tuple
Immutable generic 2-tuple
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanfinal Ufirst()Returns the first value.final inthashCode()of(U first, V second) Create a new 2-tuplefinal Vsecond()Returns the second value.final intsize()Returns the tuple size.toArray()Turns the tuple into a type erased array.final StringtoString()
-
Constructor Details
-
Pair
-
-
Method Details
-
of
Create a new 2-tuple- Type Parameters:
U- First typeV- Second type- Parameters:
first- First valuesecond- Second value- Returns:
- Created pair
-
first
Returns the first value.- Returns:
- first value
-
second
Returns the second value.- Returns:
- second value
-
equals
-
hashCode
public final int hashCode() -
toString
-
size
public final int size()Description copied from interface:TupleReturns the tuple size. -
toArray
Description copied from interface:TupleTurns the tuple into a type erased array.
-