Uses of Class
com.google.common.collect.Range
Packages that use Range
Package
Description
Collection interfaces and implementations, and other utilities for collections.
Testing utilities.
-
Uses of Range in com.google.common.collect
Fields in com.google.common.collect declared as RangeModifier and TypeFieldDescriptionprivate static final Range
<Comparable> Range.ALL
TreeRangeSet.ComplementRangesByLowerBound.complementLowerBoundWindow
complementLowerBoundWindow represents the headMap/subMap/tailMap view of the entire "complement ranges by lower bound" map; it's a constraint on the *keys*, and does not affect the values.TreeRangeSet.SubRangeSetRangesByLowerBound.lowerBoundWindow
lowerBoundWindow is the headMap/subMap/tailMap view; it only restricts the keys, and does not affect the values.RegularContiguousSet.range
RegularContiguousSet.SerializedForm.range
TreeRangeMap.RangeMapEntry.range
TreeRangeSet.SubRangeSet.restriction
TreeRangeSet.SubRangeSetRangesByLowerBound.restriction
restriction is the subRangeSet view; ranges are truncated to their intersection with restriction.TreeRangeMap.SubRangeMap.subRange
TreeRangeSet.RangesByUpperBound.upperBoundWindow
upperBoundWindow represents the headMap/subMap/tailMap view of the entire "ranges by upper bound" map; it's a constraint on the *keys*, and does not affect the values.Fields in com.google.common.collect with type parameters of type RangeModifier and TypeFieldDescriptionTreeRangeSet.asDescendingSetOfRanges
TreeRangeSet.asRanges
(package private) final Collection
<Range<C>> TreeRangeSet.AsRanges.delegate
ImmutableRangeMap.Builder.entries
TreeRangeMap.AsMapOfRanges.entryIterable
private final ImmutableMap
<Range<K>, V> ImmutableRangeMap.SerializedForm.mapOfRanges
private final NavigableMap
<Cut<C>, Range<C>> TreeRangeSet.ComplementRangesByLowerBound.positiveRangesByLowerBound
private final NavigableMap
<Cut<C>, Range<C>> TreeRangeSet.ComplementRangesByLowerBound.positiveRangesByUpperBound
private final ImmutableList
<Range<K>> ImmutableRangeMap.ranges
private final ImmutableList
<Range<C>> ImmutableRangeSet.AsSetSerializedForm.ranges
ImmutableRangeSet.Builder.ranges
private final ImmutableList
<Range<C>> ImmutableRangeSet.ranges
private final ImmutableList
<Range<C>> ImmutableRangeSet.SerializedForm.ranges
(package private) final NavigableMap
<Cut<C>, Range<C>> TreeRangeSet.rangesByLowerBound
private final NavigableMap
<Cut<C>, Range<C>> TreeRangeSet.RangesByUpperBound.rangesByLowerBound
private final NavigableMap
<Cut<C>, Range<C>> TreeRangeSet.SubRangeSetRangesByLowerBound.rangesByLowerBound
private final NavigableMap
<Cut<C>, Range<C>> TreeRangeSet.SubRangeSetRangesByLowerBound.rangesByUpperBound
private static final Collector
<Range<Comparable<?>>, ?, ImmutableRangeSet<Comparable<?>>> CollectCollectors.TO_IMMUTABLE_RANGE_SET
Methods in com.google.common.collect that return RangeModifier and TypeMethodDescriptionstatic <C extends Comparable<?>>
Range<C> Range.all()
Returns a range that contains every value of typeC
.static <C extends Comparable<?>>
Range<C> Range.atLeast
(C endpoint) Returns a range that contains all values greater than or equal toendpoint
.static <C extends Comparable<?>>
Range<C> Range.atMost
(C endpoint) Returns a range that contains all values less than or equal toendpoint
.Range.canonical
(DiscreteDomain<C> domain) Returns the canonical form of this range in the given domain.static <C extends Comparable<?>>
Range<C> Range.closed
(C lower, C upper) Returns a range that contains all values greater than or equal tolower
and less than or equal toupper
.static <C extends Comparable<?>>
Range<C> Range.closedOpen
(C lower, C upper) Returns a range that contains all values greater than or equal tolower
and strictly less thanupper
.private static <K extends Comparable,
V>
Range<K> TreeRangeMap.coalesce
(Range<K> range, V value, Map.Entry<Cut<K>, TreeRangeMap.RangeMapEntry<K, V>> entry) Returns the range that spans the given range and entry, if the entry can be coalesced.TreeRangeMap.coalescedRange
(Range<K> range, V value) Computes the coalesced range for the given range+value - does not mutate the map.(package private) static <C extends Comparable<?>>
Range<C> static <C extends Comparable<?>>
Range<C> 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<C> Range.encloseAll
(Iterable<C> values) Returns the minimal range that contains all of the given values.Returns the maximal range lying between this range andotherRange
, if such a range exists.ImmutableRangeSet.ComplementRanges.get
(int index) TreeRangeMap.RangeMapEntry.getKey()
static <C extends Comparable<?>>
Range<C> Range.greaterThan
(C endpoint) Returns a range that contains all values strictly greater thanendpoint
.Range.intersection
(Range<C> connectedRange) Returns the maximal range enclosed by both this range andconnectedRange
, if such a range exists.static <C extends Comparable<?>>
Range<C> Range.lessThan
(C endpoint) Returns a range that contains all values strictly less thanendpoint
.static <C extends Comparable<?>>
Range<C> Range.open
(C lower, C upper) Returns a range that contains all values strictly greater thanlower
and strictly less thanupper
.static <C extends Comparable<?>>
Range<C> Range.openClosed
(C lower, C upper) Returns a range that contains all values strictly greater thanlower
and less than or equal toupper
.ContiguousSet.range()
Returns a range, closed on both ends, whose endpoints are the minimum and maximum values contained in this set.Returns the minimal range with the given boundary types for which all values in this set are contained within the range.EmptyContiguousSet.range()
static <C extends Comparable<?>>
Range<C> Returns a range that contains any value fromlower
toupper
, where each endpoint may be either inclusive (closed) or exclusive (open).RegularContiguousSet.range()
AbstractRangeSet.rangeContaining
(C value) ImmutableRangeSet.rangeContaining
(C value) RangeSet.rangeContaining
(C value) Returns the unique range from this range set that containsvalue
, ornull
if this range set does not containvalue
.TreeRangeSet.rangeContaining
(C value) TreeRangeSet.SubRangeSet.rangeContaining
(C value) TreeRangeSet.rangeEnclosing
(Range<C> range) static <C extends Comparable<?>>
Range<C> Range.singleton
(C value) Returns a range that contains only the given value.ImmutableRangeMap.span()
ImmutableRangeSet.span()
Returns the minimal range that encloses both this range andother
.RangeMap.span()
Returns the minimal range enclosing the ranges in thisRangeMap
.RangeSet.span()
Returns the minimal range which encloses all ranges in this range set.TreeRangeMap.span()
TreeRangeMap.SubRangeMap.span()
TreeRangeSet.span()
static <C extends Comparable<?>>
Range<C> Returns a range with no lower bound up to the given endpoint, which may be either inclusive (closed) or exclusive (open).Methods in com.google.common.collect that return types with arguments of type RangeModifier and TypeMethodDescriptionImmutableMap
<Range<K>, V> ImmutableRangeMap.asDescendingMapOfRanges()
RangeMap.asDescendingMapOfRanges()
Returns a view of this range map as an unmodifiableMap<Range<K>, V>
.TreeRangeMap.asDescendingMapOfRanges()
TreeRangeMap.SubRangeMap.asDescendingMapOfRanges()
ImmutableRangeSet.asDescendingSetOfRanges()
RangeSet.asDescendingSetOfRanges()
Returns a descending view of the disconnected ranges that make up this range set.TreeRangeSet.asDescendingSetOfRanges()
ImmutableMap
<Range<K>, V> ImmutableRangeMap.asMapOfRanges()
RangeMap.asMapOfRanges()
Returns a view of this range map as an unmodifiableMap<Range<K>, V>
.TreeRangeMap.asMapOfRanges()
TreeRangeMap.SubRangeMap.asMapOfRanges()
ImmutableRangeSet.asRanges()
RangeSet.asRanges()
Returns a view of the disconnected ranges that make up this range set.TreeRangeSet.asRanges()
protected Collection
<Range<C>> TreeRangeSet.AsRanges.delegate()
TreeRangeSet.ComplementRangesByLowerBound.descendingEntryIterator()
TreeRangeSet.RangesByUpperBound.descendingEntryIterator()
TreeRangeSet.SubRangeSetRangesByLowerBound.descendingEntryIterator()
TreeRangeMap.AsMapOfRanges.entryIterator()
TreeRangeMap.SubRangeMap.SubRangeMapAsMap.entryIterator()
TreeRangeSet.ComplementRangesByLowerBound.entryIterator()
TreeRangeSet.RangesByUpperBound.entryIterator()
TreeRangeSet.SubRangeSetRangesByLowerBound.entryIterator()
TreeRangeMap.SubRangeMap.SubRangeMapAsMap.entrySet()
Returns the range containing this key and its associated value, if such a range is present in the range map, ornull
otherwise.NavigableMap
<Cut<C>, Range<C>> NavigableMap
<Cut<C>, Range<C>> NavigableMap
<Cut<C>, Range<C>> private ImmutableList
<Range<C>> ImmutableRangeSet.intersectRanges
(Range<C> range) Returns a list containing the nonempty intersections ofrange
with the ranges in this range set.TreeRangeMap.SubRangeMap.SubRangeMapAsMap.keySet()
(package private) static <C extends Comparable<?>>
Ordering<Range<C>> Range.rangeLexOrdering()
NavigableMap
<Cut<C>, Range<C>> TreeRangeSet.ComplementRangesByLowerBound.subMap
(Cut<C> fromKey, boolean fromInclusive, Cut<C> toKey, boolean toInclusive) private NavigableMap
<Cut<C>, Range<C>> NavigableMap
<Cut<C>, Range<C>> TreeRangeSet.RangesByUpperBound.subMap
(Cut<C> fromKey, boolean fromInclusive, Cut<C> toKey, boolean toInclusive) private NavigableMap
<Cut<C>, Range<C>> NavigableMap
<Cut<C>, Range<C>> TreeRangeSet.SubRangeSetRangesByLowerBound.subMap
(Cut<C> fromKey, boolean fromInclusive, Cut<C> toKey, boolean toInclusive) private NavigableMap
<Cut<C>, Range<C>> NavigableMap
<Cut<C>, Range<C>> NavigableMap
<Cut<C>, Range<C>> NavigableMap
<Cut<C>, Range<C>> (package private) static <E extends Comparable<? super E>>
Collector<Range<E>, ?, ImmutableRangeSet<E>> CollectCollectors.toImmutableRangeSet()
static <E extends Comparable<? super E>>
Collector<Range<E>, ?, ImmutableRangeSet<E>> ImmutableRangeSet.toImmutableRangeSet()
Returns aCollector
that accumulates the input elements into a newImmutableRangeSet
.Methods in com.google.common.collect with parameters of type RangeModifier and TypeMethodDescriptionvoid
void
Deprecated.Unsupported operation.Add the specified range to this builder.void
Adds the specified range to thisRangeSet
(optional operation).void
void
void
private static <K extends Comparable,
V>
Range<K> TreeRangeMap.coalesce
(Range<K> range, V value, Map.Entry<Cut<K>, TreeRangeMap.RangeMapEntry<K, V>> entry) Returns the range that spans the given range and entry, if the entry can be coalesced.TreeRangeMap.coalescedRange
(Range<K> range, V value) Computes the coalesced range for the given range+value - does not mutate the map.int
static <C extends Comparable>
ContiguousSet<C> ContiguousSet.create
(Range<C> range, DiscreteDomain<C> domain) Returns aContiguousSet
containing the same values in the given domain contained by the range.abstract boolean
boolean
boolean
Returnstrue
if the bounds ofother
do not extend outside the bounds of this range.boolean
Returnstrue
if there exists a member range in this range set which encloses the specified range.boolean
boolean
(package private) static <T extends Comparable>
GeneralRange<T> Converts a Range to a GeneralRange.Returns the maximal range lying between this range andotherRange
, if such a range exists.Range.intersection
(Range<C> connectedRange) Returns the maximal range enclosed by both this range andconnectedRange
, if such a range exists.private ContiguousSet
<C> RegularContiguousSet.intersectionInCurrentDomain
(Range<C> other) private ImmutableList
<Range<C>> ImmutableRangeSet.intersectRanges
(Range<C> range) Returns a list containing the nonempty intersections ofrange
with the ranges in this range set.boolean
AbstractRangeSet.intersects
(Range<C> otherRange) boolean
ImmutableRangeSet.intersects
(Range<C> otherRange) boolean
RangeSet.intersects
(Range<C> otherRange) Returnstrue
if there exists a non-empty range enclosed by both a member range in this range set and the specified range.boolean
TreeRangeSet.intersects
(Range<C> range) boolean
Range.isConnected
(Range<C> other) Returnstrue
if there exists a (possibly empty) range which is enclosed by both this range andother
.final void
ImmutableRangeMap.merge
(Range<K> range, V value, BiFunction<? super V, ? super V, ? extends V> remappingFunction) Deprecated.Unsupported operation.void
RangeMap.merge
(Range<K> range, V value, BiFunction<? super V, ? super V, ? extends V> remappingFunction) Merges a value into a part of the map by applying a remapping function.void
TreeRangeMap.merge
(Range<K> range, V value, BiFunction<? super V, ? super V, ? extends V> remappingFunction) void
TreeRangeMap.SubRangeMap.merge
(Range<K> range, V value, BiFunction<? super V, ? super V, ? extends V> remappingFunction) static <K extends Comparable<?>,
V>
ImmutableRangeMap<K, V> Returns an immutable range map mapping a single range to a single value.static <C extends Comparable>
ImmutableRangeSet<C> Returns an immutable range set containing the specified single range.Associates the specified range with the specified value.final void
Deprecated.Unsupported operation.void
Maps a range to a specified value (optional operation).void
void
final void
ImmutableRangeMap.putCoalescing
(Range<K> range, V value) Deprecated.Unsupported operation.void
RangeMap.putCoalescing
(Range<K> range, V value) Maps a range to a specified value, coalescing this range with any existing ranges with the same value that are connected to this range.void
TreeRangeMap.putCoalescing
(Range<K> range, V value) void
TreeRangeMap.SubRangeMap.putCoalescing
(Range<K> range, V value) TreeRangeSet.rangeEnclosing
(Range<C> range) void
final void
Deprecated.Unsupported operation.void
Deprecated.Unsupported operation.void
Removes all associations from this range map in the specified range (optional operation).void
Removes the specified range from thisRangeSet
(optional operation).void
void
void
void
void
private void
TreeRangeSet.replaceRangeWithSameLowerBound
(Range<C> range) Returns the minimal range that encloses both this range andother
.static <K extends Comparable<? super K>,
V>
NavigableMap<K, V> Maps.subMap
(NavigableMap<K, V> map, Range<K> range) Returns a view of the portion ofmap
whose keys are contained byrange
.private NavigableMap
<Cut<C>, Range<C>> private NavigableMap
<Cut<C>, Range<C>> private NavigableMap
<Cut<C>, Range<C>> ImmutableRangeMap.subRangeMap
(Range<K> range) RangeMap.subRangeMap
(Range<K> range) Returns a view of the part of this range map that intersects withrange
.TreeRangeMap.subRangeMap
(Range<K> subRange) TreeRangeMap.SubRangeMap.subRangeMap
(Range<K> range) ImmutableRangeSet.subRangeSet
(Range<C> range) Returns a view of the intersection of this range set with the given range.RangeSet.subRangeSet
(Range<C> view) Returns a view of the intersection of thisRangeSet
with the specified range.TreeRangeSet.subRangeSet
(Range<C> view) TreeRangeSet.SubRangeSet.subRangeSet
(Range<C> view) (package private) ImmutableSortedSet
<C> static <K extends Comparable<? super K>>
NavigableSet<K> Sets.subSet
(NavigableSet<K> set, Range<K> range) Returns a view of the portion ofset
whose elements are contained byrange
.Method parameters in com.google.common.collect with type arguments of type RangeModifier and TypeMethodDescriptionvoid
Deprecated.Unsupported operation.Add all of the specified ranges to this builder.default void
Adds all of the specified ranges to this range set (optional operation).static <C extends Comparable<?>>
ImmutableRangeSet<C> Returns anImmutableRangeSet
containing each of the specified disjoint ranges.static <C extends Comparable<?>>
TreeRangeSet<C> Returns aTreeRangeSet
representing the union of the specified ranges.default boolean
RangeSet.enclosesAll
(Iterable<Range<C>> other) Returnstrue
if for each range inother
there exists a member range in this range set which encloses it.void
Deprecated.Unsupported operation.default void
Removes all of the specified ranges from this range set (optional operation).private boolean
TreeRangeMap.SubRangeMap.SubRangeMapAsMap.removeEntryIf
(Predicate<? super Map.Entry<Range<K>, V>> predicate) (package private) static <T,
K extends Comparable<? super K>, V>
Collector<T, ?, ImmutableRangeMap<K, V>> CollectCollectors.toImmutableRangeMap
(Function<? super T, Range<K>> keyFunction, Function<? super T, ? extends V> valueFunction) static <T,
K extends Comparable<? super K>, V>
Collector<T, ?, ImmutableRangeMap<K, V>> ImmutableRangeMap.toImmutableRangeMap
(Function<? super T, Range<K>> keyFunction, Function<? super T, ? extends V> valueFunction) Returns aCollector
that accumulates the input elements into a newImmutableRangeMap
.static <C extends Comparable<?>>
ImmutableRangeSet<C> Returns anImmutableRangeSet
representing the union of the specified ranges.Constructors in com.google.common.collect with parameters of type RangeModifierConstructorDescriptionprivate
ComplementRangesByLowerBound
(NavigableMap<Cut<C>, Range<C>> positiveRangesByLowerBound, Range<Cut<C>> window) (package private)
RangeMapEntry
(Range<K> range, V value) private
RangesByUpperBound
(NavigableMap<Cut<C>, Range<C>> rangesByLowerBound, Range<Cut<C>> upperBoundWindow) (package private)
RegularContiguousSet
(Range<C> range, DiscreteDomain<C> domain) private
SerializedForm
(Range<C> range, DiscreteDomain<C> domain) (package private)
SubRangeMap
(Range<K> subRange) (package private)
SubRangeSet
(Range<C> restriction) private
SubRangeSetRangesByLowerBound
(Range<Cut<C>> lowerBoundWindow, Range<C> restriction, NavigableMap<Cut<C>, Range<C>> rangesByLowerBound) Constructor parameters in com.google.common.collect with type arguments of type RangeModifierConstructorDescription(package private)
AsRanges
(Collection<Range<C>> delegate) (package private)
AsSetSerializedForm
(ImmutableList<Range<C>> ranges, DiscreteDomain<C> domain) (package private)
ComplementRangesByLowerBound
(NavigableMap<Cut<C>, Range<C>> positiveRangesByLowerBound) private
ComplementRangesByLowerBound
(NavigableMap<Cut<C>, Range<C>> positiveRangesByLowerBound, Range<Cut<C>> window) (package private)
ImmutableRangeMap
(ImmutableList<Range<K>> ranges, ImmutableList<V> values) (package private)
ImmutableRangeSet
(ImmutableList<Range<C>> ranges) private
ImmutableRangeSet
(ImmutableList<Range<C>> ranges, ImmutableRangeSet<C> complement) (package private)
RangesByUpperBound
(NavigableMap<Cut<C>, Range<C>> rangesByLowerBound) private
RangesByUpperBound
(NavigableMap<Cut<C>, Range<C>> rangesByLowerBound, Range<Cut<C>> upperBoundWindow) (package private)
SerializedForm
(ImmutableMap<Range<K>, V> mapOfRanges) (package private)
SerializedForm
(ImmutableList<Range<C>> ranges) private
SubRangeSetRangesByLowerBound
(Range<Cut<C>> lowerBoundWindow, Range<C> restriction, NavigableMap<Cut<C>, Range<C>> rangesByLowerBound) private
TreeRangeSet
(NavigableMap<Cut<C>, Range<C>> rangesByLowerCut) -
Uses of Range in com.google.common.testing
Methods in com.google.common.testing that return RangeModifier and TypeMethodDescription(package private) static <C extends Comparable<?>>
Range<C> FreshValueGenerator.generateRange()
(package private) static <C extends Comparable<?>>
Range<C> FreshValueGenerator.generateRange
(C freshElement)