java.io.Serializable
, java.lang.Cloneable
, java.lang.Comparable<Tuple2<T1,T2>>
, java.lang.Iterable<java.lang.Object>
, Tuple
Range
public class Tuple2<T1,T2> extends java.lang.Object implements Tuple, java.lang.Comparable<Tuple2<T1,T2>>, java.io.Serializable, java.lang.Cloneable
Constructor | Description |
---|---|
Tuple2(Tuple2<T1,T2> tuple) |
|
Tuple2(T1 v1,
T2 v2) |
Modifier and Type | Method | Description |
---|---|---|
java.lang.Object[] |
array() |
Deprecated.
|
Tuple2<T1,T2> |
clone() |
|
int |
compareTo(Tuple2<T1,T2> other) |
|
<T3> Tuple3<T1,T2,T3> |
concat(Tuple1<T3> tuple) |
Concatenate a tuple to this tuple.
|
<T3,T4,T5,T6,T7,T8,T9,T10,T11,T12> |
concat(Tuple10<T3,T4,T5,T6,T7,T8,T9,T10,T11,T12> tuple) |
Concatenate a tuple to this tuple.
|
<T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13> |
concat(Tuple11<T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13> tuple) |
Concatenate a tuple to this tuple.
|
<T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14> |
concat(Tuple12<T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14> tuple) |
Concatenate a tuple to this tuple.
|
<T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15> |
concat(Tuple13<T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15> tuple) |
Concatenate a tuple to this tuple.
|
<T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16> |
concat(Tuple14<T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16> tuple) |
Concatenate a tuple to this tuple.
|
<T3,T4> Tuple4<T1,T2,T3,T4> |
concat(Tuple2<T3,T4> tuple) |
Concatenate a tuple to this tuple.
|
<T3,T4,T5> Tuple5<T1,T2,T3,T4,T5> |
concat(Tuple3<T3,T4,T5> tuple) |
Concatenate a tuple to this tuple.
|
<T3,T4,T5,T6> |
concat(Tuple4<T3,T4,T5,T6> tuple) |
Concatenate a tuple to this tuple.
|
<T3,T4,T5,T6,T7> |
concat(Tuple5<T3,T4,T5,T6,T7> tuple) |
Concatenate a tuple to this tuple.
|
<T3,T4,T5,T6,T7,T8> |
concat(Tuple6<T3,T4,T5,T6,T7,T8> tuple) |
Concatenate a tuple to this tuple.
|
<T3,T4,T5,T6,T7,T8,T9> |
concat(Tuple7<T3,T4,T5,T6,T7,T8,T9> tuple) |
Concatenate a tuple to this tuple.
|
<T3,T4,T5,T6,T7,T8,T9,T10> |
concat(Tuple8<T3,T4,T5,T6,T7,T8,T9,T10> tuple) |
Concatenate a tuple to this tuple.
|
<T3,T4,T5,T6,T7,T8,T9,T10,T11> |
concat(Tuple9<T3,T4,T5,T6,T7,T8,T9,T10,T11> tuple) |
Concatenate a tuple to this tuple.
|
<T3> Tuple3<T1,T2,T3> |
concat(T3 value) |
Concatenate a value to this tuple.
|
int |
degree() |
The degree of this tuple: 2.
|
boolean |
equals(java.lang.Object o) |
|
int |
hashCode() |
|
static <T extends java.lang.Comparable<? super T>> |
intersect(Tuple2<T,T> left,
Tuple2<T,T> right) |
The intersection of two ranges.
|
java.util.Iterator<java.lang.Object> |
iterator() |
|
Tuple0 |
limit0() |
Limit this tuple to degree 0.
|
Tuple1<T1> |
limit1() |
Limit this tuple to degree 1.
|
Tuple2<T1,T2> |
limit2() |
Limit this tuple to degree 2.
|
java.util.List<?> |
list() |
Deprecated.
|
<R> R |
map(java.util.function.BiFunction<? super T1,? super T2,? extends R> function) |
Apply this tuple as arguments to a function.
|
<U1> Tuple2<U1,T2> |
map1(java.util.function.Function<? super T1,? extends U1> function) |
Apply attribute 1 as argument to a function and return a new tuple with the substituted argument.
|
<U2> Tuple2<T1,U2> |
map2(java.util.function.Function<? super T2,? extends U2> function) |
Apply attribute 2 as argument to a function and return a new tuple with the substituted argument.
|
static <T extends java.lang.Comparable<? super T>> |
overlaps(Tuple2<T,T> left,
Tuple2<T,T> right) |
Whether two tuples overlap.
|
Tuple2<T1,T2> |
skip0() |
Skip 0 degrees from this tuple.
|
Tuple1<T2> |
skip1() |
Skip 1 degrees from this tuple.
|
Tuple0 |
skip2() |
Skip 2 degrees from this tuple.
|
Tuple2<Tuple0,Tuple2<T1,T2>> |
split0() |
Split this tuple into two tuples of degree 0 and 2.
|
Tuple2<Tuple1<T1>,Tuple1<T2>> |
split1() |
Split this tuple into two tuples of degree 1 and 1.
|
Tuple2<Tuple2<T1,T2>,Tuple0> |
split2() |
Split this tuple into two tuples of degree 2 and 0.
|
Tuple2<T2,T1> |
swap() |
Get a tuple with the two attributes swapped.
|
java.lang.Object[] |
toArray() |
Get an array representation of this tuple.
|
java.util.List<?> |
toList() |
Get a list representation of this tuple.
|
java.util.Map<java.lang.String,?> |
toMap() |
Get a map representation of this tuple.
|
<K> java.util.Map<K,?> |
toMap(java.util.function.Function<? super java.lang.Integer,? extends K> keyMapper) |
Get a map representation of this tuple.
|
<K> java.util.Map<K,?> |
toMap(java.util.function.Supplier<? extends K> keySupplier1,
java.util.function.Supplier<? extends K> keySupplier2) |
|
<K> java.util.Map<K,?> |
toMap(K key1,
K key2) |
|
Seq<?> |
toSeq() |
Get a Seq representation of this tuple.
|
java.lang.String |
toString() |
|
T1 |
v1() |
|
T2 |
v2() |
finalize, getClass, notify, notifyAll, wait, wait, wait
public T1 v1()
public T2 v2()
public final <T3> Tuple3<T1,T2,T3> concat(Tuple1<T3> tuple)
public final <T3,T4> Tuple4<T1,T2,T3,T4> concat(Tuple2<T3,T4> tuple)
public final <T3,T4,T5> Tuple5<T1,T2,T3,T4,T5> concat(Tuple3<T3,T4,T5> tuple)
public final <T3,T4,T5,T6> Tuple6<T1,T2,T3,T4,T5,T6> concat(Tuple4<T3,T4,T5,T6> tuple)
public final <T3,T4,T5,T6,T7> Tuple7<T1,T2,T3,T4,T5,T6,T7> concat(Tuple5<T3,T4,T5,T6,T7> tuple)
public final <T3,T4,T5,T6,T7,T8> Tuple8<T1,T2,T3,T4,T5,T6,T7,T8> concat(Tuple6<T3,T4,T5,T6,T7,T8> tuple)
public final <T3,T4,T5,T6,T7,T8,T9> Tuple9<T1,T2,T3,T4,T5,T6,T7,T8,T9> concat(Tuple7<T3,T4,T5,T6,T7,T8,T9> tuple)
public final <T3,T4,T5,T6,T7,T8,T9,T10> Tuple10<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10> concat(Tuple8<T3,T4,T5,T6,T7,T8,T9,T10> tuple)
public final <T3,T4,T5,T6,T7,T8,T9,T10,T11> Tuple11<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11> concat(Tuple9<T3,T4,T5,T6,T7,T8,T9,T10,T11> tuple)
public final <T3,T4,T5,T6,T7,T8,T9,T10,T11,T12> Tuple12<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12> concat(Tuple10<T3,T4,T5,T6,T7,T8,T9,T10,T11,T12> tuple)
public final <T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13> Tuple13<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13> concat(Tuple11<T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13> tuple)
public final <T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14> Tuple14<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14> concat(Tuple12<T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14> tuple)
public final <T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15> Tuple15<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15> concat(Tuple13<T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15> tuple)
public final <T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16> Tuple16<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16> concat(Tuple14<T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16> tuple)
public final Tuple2<Tuple0,Tuple2<T1,T2>> split0()
public final Tuple2<Tuple1<T1>,Tuple1<T2>> split1()
public final Tuple2<Tuple2<T1,T2>,Tuple0> split2()
public final Tuple0 limit0()
public final Tuple0 skip2()
public static final <T extends java.lang.Comparable<? super T>> boolean overlaps(Tuple2<T,T> left, Tuple2<T,T> right)
// true
range(1, 3).overlaps(range(2, 4))
// false
range(1, 3).overlaps(range(5, 8))
public static final <T extends java.lang.Comparable<? super T>> java.util.Optional<Tuple2<T,T>> intersect(Tuple2<T,T> left, Tuple2<T,T> right)
// (2, 3)
range(1, 3).intersect(range(2, 4))
// none
range(1, 3).intersect(range(5, 8))
public final <R> R map(java.util.function.BiFunction<? super T1,? super T2,? extends R> function)
public final <U1> Tuple2<U1,T2> map1(java.util.function.Function<? super T1,? extends U1> function)
public final <U2> Tuple2<T1,U2> map2(java.util.function.Function<? super T2,? extends U2> function)
@Deprecated public final java.lang.Object[] array()
Tuple
public final java.lang.Object[] toArray()
Tuple
@Deprecated public final java.util.List<?> list()
Tuple
public final java.util.List<?> toList()
Tuple
public final Seq<?> toSeq()
Tuple
public final java.util.Map<java.lang.String,?> toMap()
Tuple
public final <K> java.util.Map<K,?> toMap(java.util.function.Function<? super java.lang.Integer,? extends K> keyMapper)
Tuple
public final <K> java.util.Map<K,?> toMap(java.util.function.Supplier<? extends K> keySupplier1, java.util.function.Supplier<? extends K> keySupplier2)
public final <K> java.util.Map<K,?> toMap(K key1, K key2)
public final int degree()
public final java.util.Iterator<java.lang.Object> iterator()
iterator
in interface java.lang.Iterable<T1>
public int compareTo(Tuple2<T1,T2> other)
compareTo
in interface java.lang.Comparable<T1>
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2018. All rights reserved.