| Package | Description |
|---|---|
| com.google.common.collect |
This package contains generic collection interfaces and implementations, and other utilities for working with collections.
|
| Modifier and Type | Method and Description |
|---|---|
static <C extends Comparable |
Range.all()
Returns a range that contains every value of type
C.
|
static <C extends Comparable |
Range.atLeast(C endpoint)
Returns a range that contains all values greater than or equal to
endpoint.
|
static <C extends Comparable |
Range.atMost(C endpoint)
Returns a range that contains all values less than or equal to
endpoint.
|
Range |
Range.canonical(DiscreteDomain
Returns the canonical form of this range in the given domain.
|
static <C extends Comparable |
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.
|
static <C extends Comparable |
Range.closedOpen(C lower, C upper)
Returns a range that contains all values greater than or equal to
lower and strictly less than
upper.
|
static <C extends Comparable |
Range.downTo(C endpoint, BoundType
Returns a range from the given endpoint, which may be either inclusive (closed) or exclusive (open), with no upper bound.
|
static <C extends Comparable |
Range.encloseAll(Iterable
Returns the minimal range that
contains all of the given values.
|
static <C extends Comparable |
Range.greaterThan(C endpoint)
Returns a range that contains all values strictly greater than
endpoint.
|
Range |
Range.intersection(Range
Returns the maximal range
enclosed by both this range and
connectedRange, if such a range exists.
|
static <C extends Comparable |
Range.lessThan(C endpoint)
Returns a range that contains all values strictly less than
endpoint.
|
static <C extends Comparable |
Range.open(C lower, C upper)
Returns a range that contains all values strictly greater than
lower and strictly less than
upper.
|
static <C extends Comparable |
Range.openClosed(C lower, C upper)
Returns a range that contains all values strictly greater than
lower and less than or equal to
upper.
|
abstract Range |
ContiguousSet.range()
Returns a range, closed on both ends, whose endpoints are the minimum and maximum values contained in this set.
|
abstract Range |
ContiguousSet.range(BoundType
Returns the minimal range with the given boundary types for which all values in this set are
contained within the range.
|
static <C extends Comparable |
Range.range(C lower, BoundType
Returns a range that contains any value from
lower to
upper, where each endpoint may be either inclusive (closed) or exclusive (open).
|
Range |
ImmutableRangeSet.rangeContaining(C value)
|
Range |
RangeSet.rangeContaining(C value)
Returns the unique range from this range set that
contains
value, or
null if this range set does not contain
value.
|
Range |
TreeRangeSet.rangeContaining(C value)
|
static <C extends Comparable |
Range.singleton(C value)
Returns a range that
contains only the given value.
|
Range |
ImmutableRangeSet.span()
|
Range |
ImmutableRangeMap.span()
|
Range |
RangeSet.span()
Returns the minimal range which
encloses all ranges in this range set.
|
Range |
RangeMap.span()
Returns the minimal range
enclosing the ranges in this
RangeMap.
|
Range |
TreeRangeSet.span()
|
Range |
TreeRangeMap.span()
|
Range |
Range.span(Range
Returns the minimal range that
encloses both this range and
other.
|
static <C extends Comparable |
Range.upTo(C endpoint, BoundType
Returns a range with no lower bound up to the given endpoint, which may be either inclusive (closed) or exclusive (open).
|
| Modifier and Type | Method and Description |
|---|---|
ImmutableMap |
ImmutableRangeMap.asDescendingMapOfRanges()
|
Map |
RangeMap.asDescendingMapOfRanges()
Returns a view of this range map as an unmodifiable
Map<Range<K>, V>.
|
Map |
TreeRangeMap.asDescendingMapOfRanges()
|
ImmutableSet |
ImmutableRangeSet.asDescendingSetOfRanges()
|
Set |
RangeSet.asDescendingSetOfRanges()
Returns a descending view of the
disconnected ranges that make up this range set.
|
Set |
TreeRangeSet.asDescendingSetOfRanges()
|
ImmutableMap |
ImmutableRangeMap.asMapOfRanges()
|
Map |
RangeMap.asMapOfRanges()
Returns a view of this range map as an unmodifiable
Map<Range<K>, V>.
|
Map |
TreeRangeMap.asMapOfRanges()
|
ImmutableSet |
ImmutableRangeSet.asRanges()
|
Set |
RangeSet.asRanges()
Returns a view of the
disconnected ranges that make up this range set.
|
Set |
TreeRangeSet.asRanges()
|
Map |
ImmutableRangeMap.getEntry(K key)
|
Map |
RangeMap.getEntry(K key)
Returns the range containing this key and its associated value, if such a range is present in the range map, or
null otherwise.
|
Map |
TreeRangeMap.getEntry(K key)
|
| Modifier and Type | Method and Description |
|---|---|
void |
ImmutableRangeSet.add(Range
|
ImmutableRangeSet |
ImmutableRangeSet.Builder.add(Range
Add the specified range to this builder.
|
void |
RangeSet.add(Range
Adds the specified range to this
RangeSet (optional operation).
|
void |
TreeRangeSet.add(Range
|
static <C extends Comparable |
ContiguousSet.create(Range
Returns a
ContiguousSet containing the same values in the given domain
contained by the range.
|
boolean |
ImmutableRangeSet.encloses(Range
|
boolean |
RangeSet.encloses(Range
Returns
true if there exists a member range in this range set which
encloses the specified range.
|
boolean |
Range.encloses(Range
Returns
true if the bounds of
other do not extend outside the bounds of this range.
|
boolean |
TreeRangeSet.encloses(Range
|
Range |
Range.intersection(Range
Returns the maximal range
enclosed by both this range and
connectedRange, if such a range exists.
|
boolean |
Range.isConnected(Range
Returns
true if there exists a (possibly empty) range which is
enclosed by both this range and
other.
|
static <C extends Comparable |
ImmutableRangeSet.of(Range
Returns an immutable range set containing the specified single range.
|
static <K extends Comparable |
ImmutableRangeMap.of(Range
Returns an immutable range map mapping a single range to a single value.
|
void |
ImmutableRangeMap.put(Range
|
ImmutableRangeMap |
ImmutableRangeMap.Builder.put(Range
Associates the specified range with the specified value.
|
void |
RangeMap.put(Range
Maps a range to a specified value (optional operation).
|
void |
TreeRangeMap.put(Range
|
void |
ImmutableRangeSet.remove(Range
|
void |
RangeSet.remove(Range
Removes the specified range from this
RangeSet (optional operation).
|
void |
TreeRangeSet.remove(Range
|
void |
ImmutableRangeMap.remove(Range
|
void |
RangeMap.remove(Range
Removes all associations from this range map in the specified range (optional operation).
|
void |
TreeRangeMap.remove(Range
|
Range |
Range.span(Range
Returns the minimal range that
encloses both this range and
other.
|
ImmutableRangeMap |
ImmutableRangeMap.subRangeMap(Range
|
RangeMap |
RangeMap.subRangeMap(Range
Returns a view of the part of this range map that intersects with
range.
|
RangeMap |
TreeRangeMap.subRangeMap(Range
|
ImmutableRangeSet |
ImmutableRangeSet.subRangeSet(Range
Returns a view of the intersection of this range set with the given range.
|
RangeSet |
RangeSet.subRangeSet(Range
Returns a view of the intersection of this
RangeSet with the specified range.
|
RangeSet |
TreeRangeSet.subRangeSet(Range
|