public final class Tuples
extends java.lang.Object
Tuple.| Modifier and Type | Method and Description |
|---|---|
static Tuple |
fill(java.lang.Object value,
int length)
Create a Tuple with all elements initialized to the same value.
|
static Tuple |
intersection(Tuple t1,
Tuple t2)
Set arithmetic: compute intersection of set of tuple elements in t1 and
t2.
|
static Tuple |
pairOperation(Tuple t1,
Tuple t2,
java.util.function.BinaryOperator<java.lang.Object> fun)
Apply fun to pairs of elements from t1 and t2.
|
static Tuple |
subtract(Tuple t1,
Tuple t2)
Set arithmetic: compute subtraction of set of tuple elements in t2 from
elements in t1.
|
static Tuple |
union(Tuple t1,
Tuple t2)
Set arithmetic: compute union of set of tuple elements in t1 and t2.
|
public static Tuple union(Tuple t1, Tuple t2)
t1 - First tuple to uniont2 - Second tuple to unionpublic static Tuple intersection(Tuple t1, Tuple t2)
t1 - First tuple to intersectt2 - Second tuple to intersectpublic static Tuple subtract(Tuple t1, Tuple t2)
t1 - Base tuplet2 - Tuple to subtractpublic static Tuple pairOperation(Tuple t1, Tuple t2, java.util.function.BinaryOperator<java.lang.Object> fun)
t1 - Tuple of first argumentst2 - Tuple of second argumentsfun - The function to apply to pairs of argumentspublic static Tuple fill(java.lang.Object value, int length)
value - Value to which all elements will be initializedlength - Size of the tuple