Class Ranges

    • Method Summary

      All Methods Static Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      static <C extends java.lang.Comparable<?>>
      Range<C>
      all()
      Deprecated.
      Returns a range that contains every value of type C.
      static <C extends java.lang.Comparable<?>>
      Range<C>
      atLeast​(C endpoint)
      Deprecated.
      Returns a range that contains all values greater than or equal to endpoint.
      static <C extends java.lang.Comparable<?>>
      Range<C>
      atMost​(C endpoint)
      Deprecated.
      Returns a range that contains all values less than or equal to endpoint.
      static <C extends java.lang.Comparable<?>>
      Range<C>
      closed​(C lower, C upper)
      Deprecated.
      Returns a range that contains all values greater than or equal to lower and less than or equal to upper.
      static <C extends java.lang.Comparable<?>>
      Range<C>
      closedOpen​(C lower, C upper)
      Deprecated.
      Returns a range that contains all values greater than or equal to lower and strictly less than upper.
      static <C extends java.lang.Comparable<?>>
      Range<C>
      downTo​(C endpoint, BoundType boundType)
      Deprecated.
      Returns a range from the given endpoint, which may be either inclusive (closed) or exclusive (open), with no upper bound.
      static <C extends java.lang.Comparable<?>>
      Range<C>
      encloseAll​(java.lang.Iterable<C> values)
      Deprecated.
      Returns the minimal range that contains all of the given values.
      static <C extends java.lang.Comparable<?>>
      Range<C>
      greaterThan​(C endpoint)
      Deprecated.
      Returns a range that contains all values strictly greater than endpoint.
      static <C extends java.lang.Comparable<?>>
      Range<C>
      lessThan​(C endpoint)
      Deprecated.
      Returns a range that contains all values strictly less than endpoint.
      static <C extends java.lang.Comparable<?>>
      Range<C>
      open​(C lower, C upper)
      Deprecated.
      Returns a range that contains all values strictly greater than lower and strictly less than upper.
      static <C extends java.lang.Comparable<?>>
      Range<C>
      openClosed​(C lower, C upper)
      Deprecated.
      Returns a range that contains all values strictly greater than lower and less than or equal to upper.
      static <C extends java.lang.Comparable<?>>
      Range<C>
      range​(C lower, BoundType lowerType, C upper, BoundType upperType)
      Deprecated.
      Returns a range that contains any value from lower to upper, where each endpoint may be either inclusive (closed) or exclusive (open).
      static <C extends java.lang.Comparable<?>>
      Range<C>
      singleton​(C value)
      Deprecated.
      Returns a range that contains only the given value.
      static <C extends java.lang.Comparable<?>>
      Range<C>
      upTo​(C endpoint, BoundType boundType)
      Deprecated.
      Returns a range with no lower bound up to the given endpoint, which may be either inclusive (closed) or exclusive (open).
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • open

        public static <C extends java.lang.Comparable<?>> Range<C> open​(C lower,
                                                                        C upper)
        Deprecated.
        Returns a range that contains all values strictly greater than lower and strictly less than upper.
        Throws:
        java.lang.IllegalArgumentException - if lower is greater than or equal to upper
      • closed

        public static <C extends java.lang.Comparable<?>> Range<C> closed​(C lower,
                                                                          C upper)
        Deprecated.
        Returns a range that contains all values greater than or equal to lower and less than or equal to upper.
        Throws:
        java.lang.IllegalArgumentException - if lower is greater than upper
      • closedOpen

        public static <C extends java.lang.Comparable<?>> Range<C> closedOpen​(C lower,
                                                                              C upper)
        Deprecated.
        Returns a range that contains all values greater than or equal to lower and strictly less than upper.
        Throws:
        java.lang.IllegalArgumentException - if lower is greater than upper
      • openClosed

        public static <C extends java.lang.Comparable<?>> Range<C> openClosed​(C lower,
                                                                              C upper)
        Deprecated.
        Returns a range that contains all values strictly greater than lower and less than or equal to upper.
        Throws:
        java.lang.IllegalArgumentException - if lower is greater than upper
      • range

        public static <C extends java.lang.Comparable<?>> Range<C> range​(C lower,
                                                                         BoundType lowerType,
                                                                         C upper,
                                                                         BoundType upperType)
        Deprecated.
        Returns a range that contains any value from lower to upper, where each endpoint may be either inclusive (closed) or exclusive (open).
        Throws:
        java.lang.IllegalArgumentException - if lower is greater than upper
      • lessThan

        public static <C extends java.lang.Comparable<?>> Range<C> lessThan​(C endpoint)
        Deprecated.
        Returns a range that contains all values strictly less than endpoint.
      • atMost

        public static <C extends java.lang.Comparable<?>> Range<C> atMost​(C endpoint)
        Deprecated.
        Returns a range that contains all values less than or equal to endpoint.
      • upTo

        public static <C extends java.lang.Comparable<?>> Range<C> upTo​(C endpoint,
                                                                        BoundType boundType)
        Deprecated.
        Returns a range with no lower bound up to the given endpoint, which may be either inclusive (closed) or exclusive (open).
      • greaterThan

        public static <C extends java.lang.Comparable<?>> Range<C> greaterThan​(C endpoint)
        Deprecated.
        Returns a range that contains all values strictly greater than endpoint.
      • atLeast

        public static <C extends java.lang.Comparable<?>> Range<C> atLeast​(C endpoint)
        Deprecated.
        Returns a range that contains all values greater than or equal to endpoint.
      • downTo

        public static <C extends java.lang.Comparable<?>> Range<C> downTo​(C endpoint,
                                                                          BoundType boundType)
        Deprecated.
        Returns a range from the given endpoint, which may be either inclusive (closed) or exclusive (open), with no upper bound.
      • all

        public static <C extends java.lang.Comparable<?>> Range<C> all()
        Deprecated.
        Returns a range that contains every value of type C.
      • singleton

        public static <C extends java.lang.Comparable<?>> Range<C> singleton​(C value)
        Deprecated.
        Returns a range that contains only the given value. The returned range is closed on both ends.
      • encloseAll

        public static <C extends java.lang.Comparable<?>> Range<C> encloseAll​(java.lang.Iterable<C> values)
        Deprecated.
        Returns the minimal range that contains all of the given values. The returned range is closed on both ends.
        Throws:
        java.lang.ClassCastException - if the parameters are not mutually comparable
        java.util.NoSuchElementException - if values is empty
        java.lang.NullPointerException - if any of values is null