Class Range<T extends Comparable<T>>
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.
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanWhether a range is contained in this range.booleanWhether a value is contained in this range.The intersection of two ranges.Deprecated.The intersection of two ranges.booleanWhether two ranges overlap.booleanDeprecated.- Useoverlaps(Range)instead.booleanWhether two ranges overlap.private static <T extends Comparable<T>>
Tuple2<T, T> r(T t1, T t2) Methods inherited from class 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, v2Methods inherited from interface Iterable
forEach, spliterator
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
-
Constructor Details
-
Range
-
Range
-
-
Method Details
-
r
-
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
-
overlaps
-
intersect
-
intersect
-
intersect
-
contains
Whether a value is contained in this range.// true range(1, 3).contains(2) // false range(1, 3).contains(4) -
contains
-
intersect(Range)instead.