类 Range<T>
java.lang.Object
spring.turbo.util.Range<T>
- 类型参数:
T- 元素类型
- 所有已实现的接口:
Serializable
区间 (左闭右闭)
#ThreadSafe# 如果比较器是线程安全的,那么区间对象也是线程安全的。
- 从以下版本开始:
- 2.0.11
- 作者:
- 应卓
- 另请参阅:
-
方法概要
修饰符和类型方法说明static <T extends Comparable<T>>
Range<T>between(T fromInclusive, T toInclusive) static <T> Range<T>between(T fromInclusive, T toInclusive, Comparator<T> comparator) booleanbooleancontainsRange(Range<T> otherRange) intelementCompareTo(T element) booleaninthashCode()intersectionWith(Range<T> other) static <T extends Comparable<T>>
Range<T>is(T element) static <T> Range<T>is(T element, Comparator<T> comparator) booleanbooleanisAfterRange(Range<T> otherRange) booleanbooleanisBeforeRange(Range<T> otherRange) booleanbooleanbooleanisOverlappedBy(Range<T> otherRange) booleanisStartedBy(T element)
-
方法详细资料
-
between
-
between
public static <T> Range<T> between(T fromInclusive, T toInclusive, @Nullable Comparator<T> comparator) -
is
-
is
-
contains
-
containsRange
-
elementCompareTo
-
equals
-
getComparator
-
getMaximum
-
getMinimum
-
hashCode
public int hashCode() -
intersectionWith
-
isAfter
-
isAfterRange
-
isBefore
-
isBeforeRange
-
isEndedBy
-
isNaturalOrdering
public boolean isNaturalOrdering() -
isOverlappedBy
-
isStartedBy
-