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

java.lang.Object
org.gbif.api.util.Range<T>

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

    • 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.
    • lowerEndpoint

      @Nullable public T lowerEndpoint()
    • upperEndpoint

      @Nullable public T upperEndpoint()
    • toString

      public String toString()
      Overrides:
      toString in class Object