Class Range<T extends Comparable<? super T>>


  • public class Range<T extends Comparable<? super T>>
    extends Object
    Simplified version of guava's Range.
    • Method Detail

      • closed

        public static <T extends Comparable<? super T>> Range<T> closed​(T from,
                                                                        T to)
        Factory method.
      • hasLowerBound

        public boolean hasLowerBound()
        Returns true if this range has a lower endpoint.
      • hasUpperBound

        public boolean hasUpperBound()
        Returns true if this range has an upper endpoint.
      • contains

        public boolean contains​(@NotNull
                                T value)
        Returns true if value is within the bounds of this range.
      • encloses

        public boolean encloses​(@NotNull
                                @NotNull Range<T> other)
        Returns true if the bounds of other do not extend outside the bounds of this range.