Class ClosedOpenRange


  • @Beta
    public final class ClosedOpenRange
    extends Object
    Represent a closed-open range. The primary user of this class is the ResourceService implementation.
    • Method Detail

      • of

        public static ClosedOpenRange of​(com.google.common.collect.Range<Integer> range)
        Creates a range from a Guava's range.
        Parameters:
        range - Guava's range
        Returns:
        this range
      • of

        public static ClosedOpenRange of​(int lowerBound,
                                         int upperBound)
        Create a range with a lower bound and an upper bound.
        Parameters:
        lowerBound - lower bound (inclusive)
        upperBound - upper bound (exclusive)
        Returns:
        this range
      • lowerBound

        public int lowerBound()
        Returns the lower bound.
        Returns:
        the lower bound
      • upperBound

        public int upperBound()
        Returns the upper bound.
        Returns:
        the upper bound
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object