java.lang.Object
org.jooq.lambda.tuple.Tuple2<T,T>
org.jooq.lambda.tuple.Range<T>
- All Implemented Interfaces:
Serializable
,Cloneable
,Comparable<Tuple2<T,
,T>> Iterable<Object>
,Tuple
A range is a special
Tuple2
with two times the same type.
Ranges can be (partially) unbounded if one or both of their bounds are null
,
which corresponds to "infinity", if T
is a type that doesn't already have an
infinity value, such as Double.POSITIVE_INFINITY
or Double.NEGATIVE_INFINITY
.
Ranges are inclusive on both bounds.
- Author:
- Lukas Eder
- See Also:
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Whether a range is contained in this range.boolean
Whether a value is contained in this range.The intersection of two ranges.Deprecated.The intersection of two ranges.boolean
Whether two ranges overlap.boolean
Deprecated.- Useoverlaps(Range)
instead.boolean
Whether two ranges overlap.Methods inherited from class org.jooq.lambda.tuple.Tuple2
array, clone, compareTo, concat, concat, concat, concat, concat, concat, concat, concat, concat, concat, concat, concat, concat, concat, concat, degree, equals, hashCode, intersect, iterator, limit0, limit1, limit2, list, map, map1, map2, overlaps, skip0, skip1, skip2, split0, split1, split2, swap, toArray, toList, toMap, toMap, toMap, toMap, toSeq, toString, v1, v2
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
Range
-
Range
-
-
Method Details
-
overlaps
Deprecated.- Useoverlaps(Range)
instead.Whether two ranges overlap.// true range(1, 3).overlaps(range(2, 4)) // false range(1, 3).overlaps(range(5, 8))
-
overlaps
Whether two ranges overlap.// true range(1, 3).overlaps(range(2, 4)) // false range(1, 3).overlaps(range(5, 8))
-
overlaps
Whether two ranges overlap.// true range(1, 3).overlaps(2, 4) // false range(1, 3).overlaps(5, 8)
-
intersect
Deprecated.- Useintersect(Range)
instead.The intersection of two ranges.// (2, 3) range(1, 3).intersect(range(2, 4)) // none range(1, 3).intersect(range(5, 8))
-
intersect
The intersection of two ranges.// (2, 3) range(1, 3).intersect(range(2, 4)) // none range(1, 3).intersect(range(5, 8))
-
intersect
The intersection of two ranges.// (2, 3) range(1, 3).intersect(2, 4) // none range(1, 3).intersect(5, 8)
-
contains
Whether a value is contained in this range.// true range(1, 3).contains(2) // false range(1, 3).contains(4)
-
contains
Whether a range is contained in this range.// true range(1, 3).contains(range(2, 3)) // false range(1, 3).contains(range(2, 4))
-
intersect(Range)
instead.