Example usage for Java com.google.common.collect Range fields, constructors, methods, implement or subclass
The text is from its open source code.
Range | atLeast(C endpoint) Returns a range that contains all values greater than or equal to endpoint . |
Range | atMost(C endpoint) Returns a range that contains all values less than or equal to endpoint . |
Range | canonical(DiscreteDomain Returns the canonical form of this range in the given domain. |
Range | closed(C lower, C upper) Returns a range that contains all values greater than or equal to lower and less than or equal to upper . |
Range | closedOpen(C lower, C upper) Returns a range that contains all values greater than or equal to lower and strictly less than upper . |
boolean | contains(C value) Returns true if value is within the bounds of this range. |
Range | downTo(C endpoint, BoundType boundType) Returns a range from the given endpoint, which may be either inclusive (closed) or exclusive (open), with no upper bound. |
Range | encloseAll(Iterable Returns the minimal range that Range#contains(Comparable) contains all of the given values. |
boolean | encloses(Range Returns true if the bounds of other do not extend outside the bounds of this range. |
boolean | equals(@Nullable Object object) Returns true if object is a range having the same endpoints and bound types as this range. |
Range | greaterThan(C endpoint) Returns a range that contains all values strictly greater than endpoint . |
boolean | hasLowerBound() Returns true if this range has a lower endpoint. |
boolean | hasUpperBound() Returns true if this range has an upper endpoint. |
Range | intersection(Range Returns the maximal range #encloses enclosed by both this range and connectedRange , if such a range exists. |
boolean | isConnected(Range Returns true if there exists a (possibly empty) range which is #encloses enclosed by both this range and other . |
boolean | isEmpty() Returns true if this range is of the form [v..v) or (v..v] . |
Range | lessThan(C endpoint) Returns a range that contains all values strictly less than endpoint . |
BoundType | lowerBoundType() Returns the type of this range's lower bound: BoundType#CLOSED if the range includes its lower endpoint, BoundType#OPEN if it does not. |
C | lowerEndpoint() Returns the lower endpoint of this range. |
Range | open(C lower, C upper) Returns a range that contains all values strictly greater than lower and strictly less than upper . |
Range | openClosed(C lower, C upper) Returns a range that contains all values strictly greater than lower and less than or equal to upper . |
Range | singleton(C value) Returns a range that Range#contains(Comparable) contains only the given value. |
Range | span(Range Returns the minimal range that #encloses encloses both this range and other . |
String | toString() Returns a string representation of this range, such as "[3..5)" (other examples are listed in the class documentation). |
BoundType | upperBoundType() Returns the type of this range's upper bound: BoundType#CLOSED if the range includes its upper endpoint, BoundType#OPEN if it does not. |
C | upperEndpoint() Returns the upper endpoint of this range. |
Range | upTo(C endpoint, BoundType boundType) Returns a range with no lower bound up to the given endpoint, which may be either inclusive (closed) or exclusive (open). |