类 Range<T>

java.lang.Object
spring.turbo.util.Range<T>
类型参数:
T - 元素类型
所有已实现的接口:
Serializable

public final class Range<T> extends Object implements Serializable
区间 (左闭右闭)

#ThreadSafe# 如果比较器是线程安全的,那么区间对象也是线程安全的。

从以下版本开始:
2.0.11
作者:
应卓
另请参阅:
  • 方法详细资料

    • between

      public static <T extends Comparable<T>> Range<T> between(T fromInclusive, T toInclusive)
    • between

      public static <T> Range<T> between(T fromInclusive, T toInclusive, @Nullable Comparator<T> comparator)
    • is

      public static <T extends Comparable<T>> Range<T> is(T element)
    • is

      public static <T> Range<T> is(T element, Comparator<T> comparator)
    • contains

      public boolean contains(@Nullable T element)
    • containsRange

      public boolean containsRange(@Nullable Range<T> otherRange)
    • elementCompareTo

      public int elementCompareTo(T element)
    • equals

      public boolean equals(Object obj)
      覆盖:
      equals 在类中 Object
    • getComparator

      public Comparator<T> getComparator()
    • getMaximum

      public T getMaximum()
    • getMinimum

      public T getMinimum()
    • hashCode

      public int hashCode()
      覆盖:
      hashCode 在类中 Object
    • intersectionWith

      public Range<T> intersectionWith(Range<T> other)
    • isAfter

      public boolean isAfter(@Nullable T element)
    • isAfterRange

      public boolean isAfterRange(@Nullable Range<T> otherRange)
    • isBefore

      public boolean isBefore(@Nullable T element)
    • isBeforeRange

      public boolean isBeforeRange(@Nullable Range<T> otherRange)
    • isEndedBy

      public boolean isEndedBy(@Nullable T element)
    • isNaturalOrdering

      public boolean isNaturalOrdering()
    • isOverlappedBy

      public boolean isOverlappedBy(@Nullable Range<T> otherRange)
    • isStartedBy

      public boolean isStartedBy(@Nullable T element)