java.lang.Object
org.jooq.lambda.tuple.Tuple2<T1,T2>
- All Implemented Interfaces:
Serializable,Cloneable,Comparable<Tuple2<T1,,T2>> Iterable<Object>,Tuple
- Direct Known Subclasses:
Range
public class Tuple2<T1,T2>
extends Object
implements Tuple, Comparable<Tuple2<T1,T2>>, Serializable, Cloneable
A tuple of degree 2.
- Author:
- Lukas Eder
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal Object[]array()Deprecated.clone()intConcatenate a tuple to this tuple.Concatenate a tuple to this tuple.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> Concatenate a tuple to this tuple.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> Concatenate a tuple to this tuple.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> Concatenate a tuple to this tuple.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> Concatenate a tuple to this tuple.Concatenate a tuple to this tuple.Concatenate a tuple to this tuple.Concatenate a tuple to this tuple.Concatenate a tuple to this tuple.Concatenate a tuple to this tuple.Concatenate a tuple to this tuple.Concatenate a tuple to this tuple.Concatenate a tuple to this tuple.concat(T3 value) Concatenate a value to this tuple.final intdegree()The degree of this tuple: 2.booleaninthashCode()static final <T extends Comparable<? super T>>
Optional<Tuple2<T,T>> Deprecated.iterator()final Tuple0limit0()Limit this tuple to degree 0.limit1()Limit this tuple to degree 1.limit2()Limit this tuple to degree 2.final List<?>list()Deprecated.final <R> Rmap(BiFunction<? super T1, ? super T2, ? extends R> function) Apply this tuple as arguments to a function.Apply attribute 1 as argument to a function and return a new tuple with the substituted argument.Apply attribute 2 as argument to a function and return a new tuple with the substituted argument.static final <T extends Comparable<? super T>>
booleanDeprecated.- UseRange.overlaps(Range)instead.skip0()Skip 0 degrees from this tuple.skip1()Skip 1 degrees from this tuple.final Tuple0skip2()Skip 2 degrees from this tuple.split0()Split this tuple into two tuples of degree 0 and 2.split1()Split this tuple into two tuples of degree 1 and 1.split2()Split this tuple into two tuples of degree 2 and 0.swap()Get a tuple with the two attributes swapped.final Object[]toArray()Get an array representation of this tuple.final List<?>toList()Get a list representation of this tuple.toMap()Get a map representation of this tuple.final <K> Map<K,?> Get a map representation of this tuple.final <K> Map<K,?> final <K> Map<K,?> toMap(K key1, K key2) final Seq<?>toSeq()Get a Seq representation of this tuple.toString()v1()v2()Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
v1
-
v2
-
-
Constructor Details
-
Tuple2
-
Tuple2
-
-
Method Details
-
v1
-
v2
-
concat
Concatenate a value to this tuple. -
concat
Concatenate a tuple to this tuple. -
concat
Concatenate a tuple to this tuple. -
concat
Concatenate a tuple to this tuple. -
concat
Concatenate a tuple to this tuple. -
concat
Concatenate a tuple to this tuple. -
concat
public final <T3,T4, Tuple8<T1,T5, T6, T7, T8> T2, concatT3, T4, T5, T6, T7, T8> (Tuple6<T3, T4, T5, T6, T7, T8> tuple) Concatenate a tuple to this tuple. -
concat
public final <T3,T4, Tuple9<T1,T5, T6, T7, T8, T9> T2, concatT3, T4, T5, T6, T7, T8, T9> (Tuple7<T3, T4, T5, T6, T7, T8, T9> tuple) Concatenate a tuple to this tuple. -
concat
public final <T3,T4, Tuple10<T1,T5, T6, T7, T8, T9, T10> T2, concatT3, T4, T5, T6, T7, T8, T9, T10> (Tuple8<T3, T4, T5, T6, T7, T8, T9, T10> tuple) Concatenate a tuple to this tuple. -
concat
public final <T3,T4, Tuple11<T1,T5, T6, T7, T8, T9, T10, T11> T2, concatT3, T4, T5, T6, T7, T8, T9, T10, T11> (Tuple9<T3, T4, T5, T6, T7, T8, T9, T10, T11> tuple) Concatenate a tuple to this tuple. -
concat
public final <T3,T4, Tuple12<T1,T5, T6, T7, T8, T9, T10, T11, T12> T2, concatT3, T4, T5, T6, T7, T8, T9, T10, T11, T12> (Tuple10<T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> tuple) Concatenate a tuple to this tuple. -
concat
public final <T3,T4, Tuple13<T1,T5, T6, T7, T8, T9, T10, T11, T12, T13> T2, concatT3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> (Tuple11<T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> tuple) Concatenate a tuple to this tuple. -
concat
public final <T3,T4, Tuple14<T1,T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> T2, concatT3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> (Tuple12<T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> tuple) Concatenate a tuple to this tuple. -
concat
public final <T3,T4, Tuple15<T1,T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> T2, concatT3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> (Tuple13<T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> tuple) Concatenate a tuple to this tuple. -
concat
public final <T3,T4, Tuple16<T1,T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> T2, concatT3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> (Tuple14<T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> tuple) Concatenate a tuple to this tuple. -
split0
Split this tuple into two tuples of degree 0 and 2. -
split1
Split this tuple into two tuples of degree 1 and 1. -
split2
Split this tuple into two tuples of degree 2 and 0. -
limit0
Limit this tuple to degree 0. -
limit1
Limit this tuple to degree 1. -
limit2
Limit this tuple to degree 2. -
skip0
Skip 0 degrees from this tuple. -
skip1
Skip 1 degrees from this tuple. -
skip2
Skip 2 degrees from this tuple. -
swap
Get a tuple with the two attributes swapped. -
overlaps
@Deprecated public static final <T extends Comparable<? super T>> boolean overlaps(Tuple2<T, T> left, Tuple2<T, T> right) Deprecated.- UseRange.overlaps(Range)instead.Whether two tuples overlap.// true range(1, 3).overlaps(range(2, 4)) // false range(1, 3).overlaps(range(5, 8)) -
intersect
@Deprecated public static final <T extends Comparable<? super T>> Optional<Tuple2<T,T>> intersect(Tuple2<T, T> left, Tuple2<T, T> right) Deprecated.- UseRange.intersect(Range)instead.The intersection of two ranges.// (2, 3) range(1, 3).intersect(range(2, 4)) // none range(1, 3).intersect(range(5, 8)) -
map
Apply this tuple as arguments to a function. -
map1
Apply attribute 1 as argument to a function and return a new tuple with the substituted argument. -
map2
Apply attribute 2 as argument to a function and return a new tuple with the substituted argument. -
array
Deprecated.Description copied from interface:TupleGet an array representation of this tuple. -
toArray
Description copied from interface:TupleGet an array representation of this tuple. -
list
Deprecated.Description copied from interface:TupleGet a list representation of this tuple. -
toList
Description copied from interface:TupleGet a list representation of this tuple. -
toSeq
Description copied from interface:TupleGet a Seq representation of this tuple. -
toMap
Description copied from interface:TupleGet a map representation of this tuple. -
toMap
Description copied from interface:TupleGet a map representation of this tuple. -
toMap
-
toMap
-
degree
public final int degree()The degree of this tuple: 2. -
iterator
-
compareTo
- Specified by:
compareToin interfaceComparable<T1>
-
equals
-
hashCode
public int hashCode() -
toString
-
clone
-
Range.intersect(Range)instead.