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.ALLTreeRangeSet.ComplementRangesByLowerBound.complementLowerBoundWindowcomplementLowerBoundWindow 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.lowerBoundWindowlowerBoundWindow is the headMap/subMap/tailMap view; it only restricts the keys, and does not affect the values.RegularContiguousSet.rangeRegularContiguousSet.SerializedForm.rangeTreeRangeMap.RangeMapEntry.rangeTreeRangeSet.SubRangeSet.restrictionTreeRangeSet.SubRangeSetRangesByLowerBound.restrictionrestriction is the subRangeSet view; ranges are truncated to their intersection with restriction.TreeRangeMap.SubRangeMap.subRangeTreeRangeSet.RangesByUpperBound.upperBoundWindowupperBoundWindow 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.asDescendingSetOfRangesTreeRangeSet.asRanges(package private) final Collection<Range<C>>TreeRangeSet.AsRanges.delegateImmutableRangeMap.Builder.entriesTreeRangeMap.AsMapOfRanges.entryIterableRange.RangeLexOrdering.INSTANCEprivate final ImmutableMap<Range<K>,V> ImmutableRangeMap.SerializedForm.mapOfRangesprivate final NavigableMap<Cut<C>,Range<C>> TreeRangeSet.ComplementRangesByLowerBound.positiveRangesByLowerBoundprivate final NavigableMap<Cut<C>,Range<C>> TreeRangeSet.ComplementRangesByLowerBound.positiveRangesByUpperBoundprivate final ImmutableList<Range<K>>ImmutableRangeMap.rangesprivate final ImmutableList<Range<C>>ImmutableRangeSet.AsSetSerializedForm.rangesImmutableRangeSet.Builder.rangesprivate final ImmutableList<Range<C>>ImmutableRangeSet.rangesprivate final ImmutableList<Range<C>>ImmutableRangeSet.SerializedForm.ranges(package private) final NavigableMap<Cut<C>,Range<C>> TreeRangeSet.rangesByLowerBoundprivate final NavigableMap<Cut<C>,Range<C>> TreeRangeSet.RangesByUpperBound.rangesByLowerBoundprivate final NavigableMap<Cut<C>,Range<C>> TreeRangeSet.SubRangeSetRangesByLowerBound.rangesByLowerBoundprivate final NavigableMap<Cut<C>,Range<C>> TreeRangeSet.SubRangeSetRangesByLowerBound.rangesByUpperBoundprivate static final Collector<Range<Comparable<?>>,?, ImmutableRangeSet<Comparable<?>>> CollectCollectors.TO_IMMUTABLE_RANGE_SETMethods 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 tolowerand 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 tolowerand 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 thanlowerand strictly less thanupper.static <C extends Comparable<?>>
Range<C>Range.openClosed(C lower, C upper) Returns a range that contains all values strictly greater thanlowerand 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 fromlowertoupper, 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, ornullif 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, ornullotherwise.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 ofrangewith the ranges in this range set.TreeRangeMap.SubRangeMap.SubRangeMapAsMap.keySet()(package private) static <C extends Comparable<?>>
Function<Range<C>,Cut<C>> Range.lowerBoundFn()(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 aCollectorthat accumulates the input elements into a newImmutableRangeSet.(package private) static <C extends Comparable<?>>
Function<Range<C>,Cut<C>> Range.upperBoundFn()Methods in com.google.common.collect with parameters of type RangeModifier and TypeMethodDescriptionvoidvoidDeprecated.Unsupported operation.Add the specified range to this builder.voidAdds the specified range to thisRangeSet(optional operation).voidvoidvoidprivate 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.intstatic <C extends Comparable>
ContiguousSet<C>ContiguousSet.create(Range<C> range, DiscreteDomain<C> domain) Returns aContiguousSetcontaining the same values in the given domain contained by the range.abstract booleanbooleanbooleanReturnstrueif the bounds ofotherdo not extend outside the bounds of this range.booleanReturnstrueif there exists a member range in this range set which encloses the specified range.booleanboolean(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 ofrangewith the ranges in this range set.booleanAbstractRangeSet.intersects(Range<C> otherRange) booleanImmutableRangeSet.intersects(Range<C> otherRange) booleanRangeSet.intersects(Range<C> otherRange) Returnstrueif there exists a non-empty range enclosed by both a member range in this range set and the specified range.booleanTreeRangeSet.intersects(Range<C> range) booleanRange.isConnected(Range<C> other) Returnstrueif there exists a (possibly empty) range which is enclosed by both this range andother.final voidImmutableRangeMap.merge(Range<K> range, V value, BiFunction<? super V, ? super V, ? extends V> remappingFunction) Deprecated.Unsupported operation.voidRangeMap.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.voidTreeRangeMap.merge(Range<K> range, V value, BiFunction<? super V, ? super V, ? extends V> remappingFunction) voidTreeRangeMap.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 voidDeprecated.Unsupported operation.voidMaps a range to a specified value (optional operation).voidvoidfinal voidImmutableRangeMap.putCoalescing(Range<K> range, V value) Deprecated.Unsupported operation.voidRangeMap.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.voidTreeRangeMap.putCoalescing(Range<K> range, V value) voidTreeRangeMap.SubRangeMap.putCoalescing(Range<K> range, V value) TreeRangeSet.rangeEnclosing(Range<C> range) voidfinal voidDeprecated.Unsupported operation.voidDeprecated.Unsupported operation.voidRemoves all associations from this range map in the specified range (optional operation).voidRemoves the specified range from thisRangeSet(optional operation).voidvoidvoidvoidvoidprivate voidTreeRangeSet.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 ofmapwhose 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 thisRangeSetwith 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 ofsetwhose elements are contained byrange.Method parameters in com.google.common.collect with type arguments of type RangeModifier and TypeMethodDescriptionvoidDeprecated.Unsupported operation.Add all of the specified ranges to this builder.default voidAdds all of the specified ranges to this range set (optional operation).static <C extends Comparable<?>>
ImmutableRangeSet<C>Returns anImmutableRangeSetcontaining each of the specified disjoint ranges.static <C extends Comparable<?>>
TreeRangeSet<C>Returns aTreeRangeSetrepresenting the union of the specified ranges.default booleanRangeSet.enclosesAll(Iterable<Range<C>> other) Returnstrueif for each range inotherthere exists a member range in this range set which encloses it.voidDeprecated.Unsupported operation.default voidRemoves all of the specified ranges from this range set (optional operation).private booleanTreeRangeMap.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 aCollectorthat accumulates the input elements into a newImmutableRangeMap.static <C extends Comparable<?>>
ImmutableRangeSet<C>Returns anImmutableRangeSetrepresenting the union of the specified ranges.Constructors in com.google.common.collect with parameters of type RangeModifierConstructorDescriptionprivateComplementRangesByLowerBound(NavigableMap<Cut<C>, Range<C>> positiveRangesByLowerBound, Range<Cut<C>> window) (package private)RangeMapEntry(Range<K> range, V value) privateRangesByUpperBound(NavigableMap<Cut<C>, Range<C>> rangesByLowerBound, Range<Cut<C>> upperBoundWindow) (package private)RegularContiguousSet(Range<C> range, DiscreteDomain<C> domain) privateSerializedForm(Range<C> range, DiscreteDomain<C> domain) (package private)SubRangeMap(Range<K> subRange) (package private)SubRangeSet(Range<C> restriction) privateSubRangeSetRangesByLowerBound(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) privateComplementRangesByLowerBound(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) privateImmutableRangeSet(ImmutableList<Range<C>> ranges, ImmutableRangeSet<C> complement) (package private)RangesByUpperBound(NavigableMap<Cut<C>, Range<C>> rangesByLowerBound) privateRangesByUpperBound(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) privateSubRangeSetRangesByLowerBound(Range<Cut<C>> lowerBoundWindow, Range<C> restriction, NavigableMap<Cut<C>, Range<C>> rangesByLowerBound) privateTreeRangeSet(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)