Package com.google.common.collect
@ParametersAreNonnullByDefault
package com.google.common.collect
Collection interfaces and implementations, and other utilities for collections. This package is a
part of the open-source Guava library.
The classes in this package include:
Immutable collections
These are collections whose contents will never change. They also offer a few additional guarantees (seeImmutableCollection
for details). Implementations are available for both
the JDK collection types and the Guava collection types (listed below).
Collection types
Multimap
- A new type, which is similar to
Map
, but may contain multiple entries with the same key. Some behaviors ofMultimap
are left unspecified and are provided only by the subtypes mentioned below. ListMultimap
- An extension of
Multimap
which permits duplicate entries, supports random access of values for a particular key, and has partially order-dependent equality as defined byListMultimap.equals(Object)
.ListMultimap
takes its name from the fact that the collection of values associated with a given key fulfills theList
contract. SetMultimap
- An extension of
Multimap
which has order-independent equality and does not allow duplicate entries; that is, while a key may appear twice in aSetMultimap
, each must map to a different value.SetMultimap
takes its name from the fact that the collection of values associated with a given key fulfills theSet
contract. SortedSetMultimap
- An extension of
SetMultimap
for which the collection values associated with a given key is aSortedSet
. BiMap
- An extension of
Map
that guarantees the uniqueness of its values as well as that of its keys. This is sometimes called an "invertible map," since the restriction on values enables it to support an inverse view -- which is another instance ofBiMap
. Table
- A new type, which is similar to
Map
, but which indexes its values by an ordered pair of keys, a row key and column key. Multiset
- An extension of
Collection
that may contain duplicate values like aList
, yet has order-independent equality like aSet
. One typical use for a multiset is to represent a histogram. ClassToInstanceMap
- An extension of
Map
that associates a raw type with an instance of that type.
Ranges
Classes of static utility methods
Collections2
Comparators
Iterables
Iterators
Lists
Maps
MoreCollectors
Multimaps
Multisets
ObjectArrays
Queues
Sets
Streams
Tables
Abstract implementations
Forwarding collections
We provide implementations of collections that forward all method calls to a delegate collection by default. Subclasses can override one or more methods to implement the decorator pattern. For an example, seeForwardingCollection
.
Other
-
ClassDescriptionAbstractBiMap<K,
V> A general-purpose bimap implementation using any two backingMap
instances.The inverse of any otherAbstractBiMap
subclass.This class provides a skeletal implementation of theListIterator
interface across a fixed number of elements that may be retrieved by position.This class provides a skeletal implementation of theIterator
interface, to make this interface easier to implement for certain types of data sources.AbstractListMultimap<K,V> Basic implementation of theListMultimap
interface.Basic implementation of theMultimap
interface.Basic implementation ofMultiset<E>
backed by an instance ofMap<E, Count>
.AbstractMapEntry<K,V> Implementation of theequals
,hashCode
, andtoString
methods ofEntry
.AbstractMultimap<K,V> A skeletonMultimap
implementation, not necessarily in terms of aMap
.This class provides a skeletal implementation of theMultiset
interface.AbstractNavigableMap<K,V> Skeletal implementation ofNavigableMap
.AbstractRangeSet<C extends Comparable>A skeletal implementation ofRangeSet
.This class provides a skeletal implementation of theIterator
interface for sequences whose next element can always be derived from the previous element.AbstractSetMultimap<K,V> Basic implementation of theSetMultimap
interface.Basic implementation of aSortedSetMultimap
with a sorted key set.This class provides a skeletal implementation of theSortedMultiset
interface.Basic implementation of theSortedSetMultimap
interface.AbstractTable<R,C, V> Skeletal, implementation-agnostic implementation of theTable
interface.An ordering that treats all references as equals, even nulls.ArrayListMultimap<K,V> Implementation ofMultimap
that uses anArrayList
to store the values for a given key.A dummy superclass to support GWT serialization of the element types of anArrayListMultimap
.ArrayTable<R,C, V> Fixed-sizeTable
implementation backed by a two-dimensional array.ArrayTable.ArrayMap<K,V> A dummy superclass ofImmutableMultimap
that can be instanceof'd without ProGuard retaining additional implementation details ofImmutableMultimap
.BiMap<K,V> A bimap (or "bidirectional map") is a map that preserves the uniqueness of its values as well as that of its keys.Indicates whether an endpoint of some range is contained in the range itself ("closed") or not ("open").ByFunctionOrdering<F,T> An ordering that orders elements by applying an order to the result of a function on those elements.Implementation ofLists.cartesianProduct(List)
.A map, each entry of which maps a Java raw type to an instance of that type.Collectors utilities forcommon.collect
internals.CollectCollectors.EnumSetAccumulator<E extends Enum<E>>Provides static methods for working withCollection
instances.Precondition checks useful in collection implementations.Spliterator utilities forcommon.collect
internals.CollectSpliterators.FlatMapSpliterator<InElementT,OutElementT, OutSpliteratorT extends Spliterator<OutElementT>> Implements theinvalid reference
Stream#flatMap
CollectSpliterators.FlatMapSpliterator.Factory<InElementT,OutSpliteratorT extends Spliterator<?>> Factory for constructingCollectSpliterators.FlatMapSpliterator
instances.CollectSpliterators.FlatMapSpliteratorOfDouble<InElementT>CollectSpliterators.FlatMapSpliteratorOfInt<InElementT>CollectSpliterators.FlatMapSpliteratorOfLong<InElementT>CollectSpliterators.FlatMapSpliteratorOfObject<InElementT,OutElementT> Implementation ofinvalid reference
Stream#flatMap
CollectSpliterators.FlatMapSpliteratorOfPrimitive<InElementT,OutElementT, OutConsumerT, OutSpliteratorT extends Spliterator.OfPrimitive<OutElementT, OutConsumerT, OutSpliteratorT>> Implementation ofinvalid reference
Stream#flatMap
Helper classes and static methods for implementing compact hash-based collections.CompactHashMap<K,V> CompactHashMap is an implementation of a Map.CompactHashSet is an implementation of a Set.CompactLinkedHashMap<K,V> CompactLinkedHashMap is an implementation of a Map with insertion or LRU iteration order, maintained with a doubly linked list through the entries.CompactLinkedHashSet is an implementation of a Set, which a predictable iteration order that matches the insertion order.An ordering for a pre-existing comparator.Provides static methods for working withComparator
instances.A utility for performing a chained comparison statement.An ordering that tries several comparators in order.Deprecated.A multiset that supports concurrent modifications and that provides atomic versions of mostMultiset
operations (exceptions where noted).An Iterator implementation which draws elements from a queue, removing them from the queue as it iterates.ContiguousSet<C extends Comparable>A sorted set of contiguous values in a givenDiscreteDomain
.A mutable value of typeint
, for multisets to use in tracking counts of values.Cut<C extends Comparable>Implementation detail for the internal structure ofRange
instances.Cut.AboveValue<C extends Comparable>Cut.BelowValue<C extends Comparable>DenseImmutableTable<R,C, V> ARegularImmutableTable
optimized for dense data.An immutable map implementation backed by an indexed nullable array.A descending wrapper around anImmutableSortedMultiset
Skeletal implementation ofImmutableSortedSet.descendingSet()
.A skeleton implementation of a descending multiset.DiscreteDomain<C extends Comparable>A descriptor for a discreteComparable
domain such as allInteger
instances.Marks all "top-level" types as non-null in a way that is recognized by Kotlin.EmptyContiguousSet<C extends Comparable>An empty contiguous set.EmptyContiguousSet.SerializedForm<C extends Comparable>Implementation ofImmutableListMultimap
with no entries.Implementation ofImmutableListMultimap
with no entries.ABiMap
backed by twoEnumMap
instances.ABiMap
backed by anEnumMap
instance for keys-to-values, and aHashMap
instance for values-to-keys.EnumMultiset<E extends Enum<E>>Multiset implementation specialized for enum elements, supporting all single-element operations in O(1).A non-blocking queue which automatically evicts elements from the head of the queue when attempting to add new elements onto the queue and it is full.An ordering that compares objects according to a given order.Implementation ofMultimaps.filterEntries(Multimap, Predicate)
.Implementation ofMultimaps.filterEntries(SetMultimap, Predicate)
.Implementation ofMultimaps.filterKeys(ListMultimap, Predicate)
.FilteredKeyMultimap<K,V> Implementation ofMultimaps.filterKeys(Multimap, Predicate)
.Implementation ofMultimaps.filterKeys(SetMultimap, Predicate)
.FilteredMultimap<K,V> An interface for all filtered multimap types.Implementation forMultimap.values()
.FilteredSetMultimap<K,V> A supertype for filteredSetMultimap
implementations.A discouraged (but not deprecated) precursor to Java's superiorStream
library.Function that transformsIterable<E>
into a fluent iterable.Deprecated.This class has moved tocom.google.common.util.concurrent
.A collection which forwards all its method calls to another collection.A concurrent map which forwards all its method calls to another concurrent map.A deque which forwards all its method calls to another deque.Dummy class that makes the GWT serialization policy happy.Unused stub class, unreferenced under Java and manually emulated under GWT.Unused stub class, unreferenced under Java and manually emulated under GWT.Unused stub class, unreferenced under Java and manually emulated under GWT.An iterator which forwards all its method calls to another iterator.A list which forwards all its method calls to another list.A list iterator which forwards all its method calls to another list iterator.A list multimap which forwards all its method calls to another list multimap.ForwardingMap<K,V> A map which forwards all its method calls to another map.ForwardingMapEntry<K,V> A map entry which forwards all its method calls to another map entry.ForwardingMultimap<K,V> A multimap which forwards all its method calls to another multimap.A multiset which forwards all its method calls to another multiset.A navigable map which forwards all its method calls to another navigable map.A navigable set which forwards all its method calls to another navigable set.An abstract base class for implementing the decorator pattern.A queue which forwards all its method calls to another queue.A set which forwards all its method calls to another set.A set multimap which forwards all its method calls to another set multimap.ForwardingSortedMap<K,V> A sorted map which forwards all its method calls to another sorted map.A sorted multiset which forwards all its method calls to another sorted multiset.A sorted set which forwards all its method calls to another sorted set.A sorted set multimap which forwards all its method calls to another sorted set multimap.ForwardingTable<R,C, V> A table which forwards all its method calls to another table.GeneralRange<T>A generalized interval on any ordering, for internal use.Private replacement forinvalid reference
com.google.gwt.user.client.rpc.GwtTransient
HashBasedTable<R,C, V> Implementation ofTable
using linked hash tables.HashBiMap<K,V> ABiMap
backed by two hash tables.HashBiMap.BiEntry<K,V> Static methods for implementing hash-based collections.HashMultimap<K,V> Implementation ofMultimap
using hash tables.A dummy superclass to support GWT serialization of the element types of aHashMultimap
.HashMultiset<E>Multiset implementation backed by aHashMap
.Disables Animal Sniffer's checking of compatibility with older versions of Java/Android.List returned byImmutableCollection.asList()
that delegatescontains
checks to the backing collection.Serialized form that leads to the same performance as the original list.ImmutableBiMap<K,V> ABiMap
whose contents will never change, with many other important properties detailed atImmutableCollection
.A builder for creating immutable bimap instances, especiallypublic static final
bimaps ("constant bimaps").Serialized type for all ImmutableBiMap instances.AClassToInstanceMap
whose contents will never change, with many other important properties detailed atImmutableCollection
.A builder for creating immutable class-to-instance maps.ACollection
whose contents will never change, and which offers a few additional guarantees detailed below.Abstract base class for builders ofImmutableCollection
types.ImmutableEntry<K,V> An immutableMap.Entry
, used both byMaps.immutableEntry(Object, Object)
and by other parts ofcommon.collect
as a superclass.Implementation ofImmutableMap
backed by a non-emptyEnumMap
.ImmutableEnumSet<E extends Enum<E>>Implementation ofImmutableSet
backed by a non-emptyEnumSet
.ImmutableEnumSet.EnumSerializedForm<E extends Enum<E>>AList
whose contents will never change, with many other important properties detailed atImmutableCollection
.A builder for creating immutable list instances, especiallypublic static final
lists ("constant lists").AListMultimap
whose contents will never change, with many other important properties detailed atImmutableCollection
.A builder for creating immutableListMultimap
instances, especiallypublic static final
multimaps ("constant multimaps").ImmutableMap<K,V> AMap
whose contents will never change, with many other important properties detailed atImmutableCollection
.ImmutableMap.Builder<K,V> A builder for creating immutable map instances, especiallypublic static final
maps ("constant maps").Serialized type for all ImmutableMap instances.ImmutableMapEntry<K,V> Implementation ofEntry
forImmutableMap
that adds extra methods to traverse hash buckets for the key and the value.ImmutableMapEntrySet<K,V> entrySet()
implementation forImmutableMap
.ImmutableMapKeySet<K,V> keySet()
implementation forImmutableMap
.ImmutableMapValues<K,V> values()
implementation forImmutableMap
.ImmutableMultimap<K,V> AMultimap
whose contents will never change, with many other important properties detailed atImmutableCollection
.A builder for creating immutable multimap instances, especiallypublic static final
multimaps ("constant multimaps").AMultiset
whose contents will never change, with many other important properties detailed atImmutableCollection
.A builder for creating immutable multiset instances, especiallypublic static final
multisets ("constant multisets").A dummy superclass to support GWT serialization of the element type of anImmutableMultiset
.ARangeMap
whose contents will never change, with many other important properties detailed atImmutableCollection
.A builder for immutable range maps.This class is used to serialize ImmutableRangeMap instances.ImmutableRangeSet<C extends Comparable>ARangeSet
whose contents will never change, with many other important properties detailed atImmutableCollection
.ImmutableRangeSet.AsSetSerializedForm<C extends Comparable>ImmutableRangeSet.Builder<C extends Comparable<?>>A builder for immutable range sets.ImmutableRangeSet.SerializedForm<C extends Comparable>ImmutableSet<E>ASet
whose contents will never change, with many other important properties detailed atImmutableCollection
.A builder for creatingImmutableSet
instances.SetBuilderImpl version that uses a JDK HashSet, which has built in hash flooding protection.Default implementation of the guts of ImmutableSet.Builder, creating an open-addressed hash table and deduplicating elements as they come, so it only allocates O(max(distinct, expectedCapacity)) rather than O(calls to add).Swappable internal implementation of an ImmutableSet.Builder.ImmutableSetMultimap<K,V> ASetMultimap
whose contents will never change, with many other important properties detailed atImmutableCollection
.A builder for creating immutableSetMultimap
instances, especiallypublic static final
multimaps ("constant multimaps").List returned byImmutableSortedSet.asList()
when the set isn't empty.ImmutableSortedMap<K,V> ANavigableMap
whose contents will never change, with many other important properties detailed atImmutableCollection
.A builder for creating immutable sorted map instances, especiallypublic static final
maps ("constant maps").Serialized type for all ImmutableSortedMap instances.ASortedMultiset
whose contents will never change, with many other important properties detailed atImmutableCollection
.A builder for creating immutable multiset instances, especiallypublic static final
multisets ("constant multisets").ANavigableSet
whose contents will never change, with many other important properties detailed atImmutableCollection
.A builder for creating immutable sorted set instances, especiallypublic static final
sets ("constant sets"), with a given comparator.ImmutableTable<R,C, V> ATable
whose contents will never change, with many other important properties detailed atImmutableCollection
.ImmutableTable.Builder<R,C, V> A builder for creating immutable table instances, especiallypublic static final
tables ("constant tables").Serialized type for all ImmutableTable instances.Interner<E>Provides similar behavior toString.intern()
for any immutable type.Contains static methods pertaining to instances ofInterner
.Builder forInterner
instances.An assortment of mainly legacy static utility methods that operate on or return objects of typeIterable
.This class contains static utility methods that operate on or return objects of typeIterator
.This is an enum singleton rather than an anonymous class so ProGuard can figure out it's only referenced by emptyModifiableIterator().An iterator that performs a lazy N-way merge, calculating the next value each time the iterator is polled.Implementation of PeekingIterator that avoids peeking unless necessary.Implementation of ImmutableBiMap backed by a pair of JDK HashMaps, which have smartness protecting against hash flooding.Implementation of ImmutableMap backed by a JDK HashMap, which has smartness protecting against hash flooding.An implementation of ImmutableMultiset backed by a JDK Map and a list of entries.ImmutableSet implementation backed by a JDK HashSet, used to defend against apparent hash flooding.An ordering which sorts iterables by comparing corresponding elements pairwise.LinkedHashMultimap<K,V> Implementation ofMultimap
that does not allow duplicate key-value entries and that returns collections whose iterators follow the ordering in which the data was added to the multimap.LinkedHashMultimap entries are in no less than three coexisting linked lists: a bucket in the hash table for aSet<V>
associated with a key, the linked list of insertion-ordered entries in thatSet<V>
, and the linked list of entries in the LinkedHashMultimap as a whole.A dummy superclass to support GWT serialization of the element types of aLinkedHashMultimap
.AMultiset
implementation with predictable iteration order.LinkedListMultimap<K,V> An implementation ofListMultimap
that supports deterministic iteration order for both keys and values.ListMultimap<K,V> AMultimap
that can hold duplicate key-value pairs and that maintains the insertion ordering of values for a given key.Static utility methods pertaining toList
instances.Implementation of a transforming random access list.Implementation of a sequential transforming list.MapDifference<K,V> An object representing the differences between two maps.A difference between the mappings from two maps with the same key.A builder ofConcurrentMap
instances that can have keys or values automatically wrapped in weak references.A dummy singleton value type used byInterners
.MapMakerInternalMap<K,V, E extends MapMakerInternalMap.InternalEntry<K, V, E>, S extends MapMakerInternalMap.Segment<K, V, E, S>> The concurrent hash map implementation built byMapMaker
.The actual object that gets serialized.MapMakerInternalMap.AbstractStrongKeyEntry<K,V, E extends MapMakerInternalMap.InternalEntry<K, V, E>> Base class forMapMakerInternalMap.InternalEntry
implementations for strong keys.MapMakerInternalMap.AbstractWeakKeyEntry<K,V, E extends MapMakerInternalMap.InternalEntry<K, V, E>> Base class forMapMakerInternalMap.InternalEntry
implementations for weak keys.A dummy implementation ofMapMakerInternalMap.InternalEntry
, solely for use in the type signature ofMapMakerInternalMap.UNSET_WEAK_VALUE_REFERENCE
below.MapMakerInternalMap.InternalEntry<K,V, E extends MapMakerInternalMap.InternalEntry<K, V, E>> An entry in a hash table of aMapMakerInternalMap.Segment
.MapMakerInternalMap.InternalEntryHelper<K,V, E extends MapMakerInternalMap.InternalEntry<K, V, E>, S extends MapMakerInternalMap.Segment<K, V, E, S>> A helper object for operating onMapMakerInternalMap.InternalEntry
instances in a type-safe and efficient manner.MapMakerInternalMap.Segment<K,V, E extends MapMakerInternalMap.InternalEntry<K, V, E>, S extends MapMakerInternalMap.Segment<K, V, E, S>> Segments are specialized versions of hash tables.The actual object that gets serialized.Concrete implementation ofMapMakerInternalMap.InternalEntry
for strong keys andMapMaker.Dummy
values.Concrete implementation ofMapMakerInternalMap.InternalEntryHelper
for strong keys andMapMaker.Dummy
values.Concrete implementation ofMapMakerInternalMap.Segment
for strong keys andMapMaker.Dummy
values.Concrete implementation ofMapMakerInternalMap.InternalEntry
for strong keys and strong values.Concrete implementation ofMapMakerInternalMap.InternalEntryHelper
for strong keys and strong values.Concrete implementation ofMapMakerInternalMap.Segment
for strong keys and strong values.Concrete implementation ofMapMakerInternalMap.InternalEntry
for strong keys and weak values.Concrete implementation ofMapMakerInternalMap.InternalEntryHelper
for strong keys and weak values.Concrete implementation ofMapMakerInternalMap.Segment
for strong keys and weak values.MapMakerInternalMap.StrongValueEntry<K,V, E extends MapMakerInternalMap.InternalEntry<K, V, E>> Marker interface forMapMakerInternalMap.InternalEntry
implementations for strong values.Concrete implementation ofMapMakerInternalMap.InternalEntry
for weak keys andMapMaker.Dummy
values.Concrete implementation ofMapMakerInternalMap.InternalEntryHelper
for weak keys andMapMaker.Dummy
values.Concrete implementation ofMapMakerInternalMap.Segment
for weak keys andMapMaker.Dummy
values.Concrete implementation ofMapMakerInternalMap.InternalEntry
for weak keys and strong values.Concrete implementation ofMapMakerInternalMap.InternalEntryHelper
for weak keys and strong values.Concrete implementation ofMapMakerInternalMap.Segment
for weak keys and strong values.Concrete implementation ofMapMakerInternalMap.InternalEntry
for weak keys and weak values.Concrete implementation ofMapMakerInternalMap.InternalEntryHelper
for weak keys and weak values.Concrete implementation ofMapMakerInternalMap.Segment
for weak keys and weak values.MapMakerInternalMap.WeakValueEntry<K,V, E extends MapMakerInternalMap.InternalEntry<K, V, E>> Marker interface forMapMakerInternalMap.InternalEntry
implementations for weak values.MapMakerInternalMap.WeakValueReference<K,V, E extends MapMakerInternalMap.InternalEntry<K, V, E>> A weakly referenced value that also has a reference to its containing entry.MapMakerInternalMap.WeakValueReferenceImpl<K,V, E extends MapMakerInternalMap.InternalEntry<K, V, E>> Concrete implementation ofMapMakerInternalMap.WeakValueReference
.Maps.AsMapView<K,V> Maps.BiMapConverter<A,B> Maps.DescendingMap<K,V> Maps.EntrySet<K,V> Maps.EntryTransformer<K,V1, V2> A transformation of the value of a key-value pair, using both key and value as inputs.Maps.FilteredKeyMap<K,V> Maps.KeySet<K,V> Maps.NavigableKeySet<K,V> Maps.SortedAsMapView<K,V> Maps.SortedKeySet<K,V> Maps.TransformedEntriesMap<K,V1, V2> Maps.TransformedEntriesNavigableMap<K,V1, V2> Maps.TransformedEntriesSortedMap<K,V1, V2> The implementation ofMultimaps.unmodifiableEntries(java.util.Collection<java.util.Map.Entry<K, V>>)
.The implementation ofMaps.unmodifiableEntrySet(Set)
.Maps.Values<K,V> AbstractMap
extension that makes it easy to cache customized keySet, values, and entrySet views.A double-ended priority queue, which provides constant-time access to both its least element and its greatest element, as determined by the queue's specified comparator.The builder class used in creation of min-max priority queues.Collectors not present injava.util.stream.Collectors
that are not otherwise associated with acom.google.common
type.This atrocity is here to let us report several of the elements in the stream if there were more than one, not just two.Multimap<K,V> A collection that maps keys to values, similar toMap
, but in which each key may be associated with multiple values.MultimapBuilder<K0,V0> An immutable builder forMultimap
instances, letting you independently select the desired behaviors (for example, ordering) of the backing map and value-collections.MultimapBuilder.EnumSetSupplier<V extends Enum<V>>A specialization ofMultimapBuilder
that generatesListMultimap
instances.An intermediate stage in aMultimapBuilder
in which the key-value collection map implementation has been specified, but the value collection implementation has not.A specialization ofMultimapBuilder
that generatesSetMultimap
instances.A specialization ofMultimapBuilder
that generatesSortedSetMultimap
instances.Provides static methods acting on or generating aMultimap
.Multimaps.AsMap<K,V> A skeleton implementation ofMultimap.asMap()
.Multimaps.Entries<K,V> A skeleton implementation ofMultimap.entries()
.Multimaps.Keys<K,V> Multimaps.TransformedEntriesMultimap<K,V1, V2> Multiset<E>A collection that supports order-independent equality, likeSet
, but may have duplicate elements.An unmodifiable element-count pair for a multiset.Provides static utility methods for creating and working withMultiset
instances.AnAbstractMultiset
with additional default implementations, some of them linear-time implementations in terms ofelementSet
andentrySet
.A mutable class-to-instance map backed by an arbitrary user-provided map.Serialized form of the map, to avoid serializing the constraint.An ordering that uses the natural order of the values.A utility method to perform unchecked casts to suppress errors produced by nullness analyses.An ordering that treatsnull
as less than all other values.An ordering that treatsnull
as greater than all other values.Static utility methods pertaining to object arrays.Ordering<T>A comparator, with additional methods to support common operations.Exception thrown by aOrdering.explicit(List)
orOrdering.explicit(Object, Object[])
comparator when comparing a value outside the set of values it can compare.Annotates a "top-level" type-variable usage that takes its nullness from the type argument supplied by the user of the class.An iterator that supports a one-element lookahead while iterating.Methods factored out so that they can be emulated differently in GWT.Range<C extends Comparable>A range (or "interval") defines the boundaries around a contiguous span of values of someComparable
type; for example, "integers from 1 to 100 inclusive." Note that it is not possible to iterate over these contained values.Needed to serialize sorted collections of Ranges.RangeGwtSerializationDependencies<C extends Comparable>A dummy superclass to support GWT serialization of the element type of aRange
.A mapping from disjoint nonempty ranges to non-null values.RangeSet<C extends Comparable>RegularContiguousSet<C extends Comparable>An implementation ofContiguousSet
that contains one or more elements.RegularContiguousSet.SerializedForm<C extends Comparable>AnImmutableAsList
implementation specialized for when the delegate collection is already backed by anImmutableList
or array.Bimap with zero or more mappings.Implementation ofImmutableList
backed by a simple array.RegularImmutableMap<K,V> Implementation ofImmutableMap
used for 0 entries and for 2+ entries.Implementation ofImmutableMultiset
with zero or more elements.Implementation ofImmutableSet
with two or more elements.An immutable sorted multiset with one or more distinct elements.An immutable sorted set with one or more elements.RegularImmutableTable<R,C, V> An implementation ofImmutableTable
holding an arbitrary number of cells.An ordering that uses the reverse of the natural order of the values.An ordering that uses the reverse of a given order.RowSortedTable<R,C, V> Interface that extendsTable
and whose rows are sorted.Provides static methods for serializing collection classes.SetMultimap<K,V> AMultimap
that cannot hold duplicate key-value pairs.Static utility methods pertaining toSet
instances.AbstractSet
substitute without the potentially-quadraticremoveAll
implementation.Sets.SetView<E>An unmodifiable view of a set which may be backed by other sets; this view will change as the backing sets do.Sets.SubSet<E>Implementation ofImmutableMap
with exactly one entry.Implementation ofImmutableList
with exactly one element.Implementation ofImmutableSet
with exactly one element.SingletonImmutableTable<R,C, V> An implementation ofImmutableTable
that holds a single cell.AnIterable
whose elements are sorted relative to aComparator
, typically provided at creation time.Utilities for dealing with sorted collections of all types.Static methods pertaining to sortedList
instances.A specification for which index to return if the list contains no elements that compare as equal to the key.A specification for which index to return if the list contains at least one element that compares as equal to the key.SortedMapDifference<K,V> An object representing the differences between two sorted maps.AMultiset
which maintains the ordering of its elements, according to either their natural order or an explicitComparator
.Superinterface ofSortedMultiset
to introduce a bridge method forelementSet()
, to ensure binary compatibility with older Guava versions that specifiedelementSet()
to returnSortedSet
.Provides static utility methods for creating and working withSortedMultiset
instances.A skeleton implementation forSortedMultiset.elementSet()
.A skeleton navigable implementation forSortedMultiset.elementSet()
.SortedSetMultimap<K,V> ASetMultimap
whose set of values for a given key are kept sorted; that is, they comprise aSortedSet
.SparseImmutableTable<R,C, V> ARegularImmutableTable
optimized for sparse data.StandardRowSortedTable<R,C, V> Implementation ofTable
whose iteration ordering across row keys is sorted by their natural ordering or by a supplied comparator.StandardTable<R,C, V> Table
implementation backed by a map that associates row keys with column key / value secondary maps.Static utility methods related toStream
instances.An analogue ofDoubleFunction
also accepting an index.An analogue ofFunction
also accepting an index.An analogue ofIntFunction
also accepting an index.An analogue ofLongFunction
also accepting an index.Streams.MapWithIndexSpliterator<F extends Spliterator<?>,R, S extends Streams.MapWithIndexSpliterator<F, R, S>> Synchronized collection views.Table<R,C, V> A collection that associates an ordered pair of keys, called a row key and a column key, with a single value.Table.Cell<R,C, V> Row key / column key / value triplet corresponding to a mapping in a table.Collectors utilities forcommon.collect.Table
internals.TableCollectors.MutableCell<R,C, V> Provides static methods that involve aTable
.Tables.AbstractCell<R,C, V> Tables.ImmutableCell<R,C, V> Tables.TransformedTable<R,C, V1, V2> Tables.TransposeTable<C,R, V> Tables.UnmodifiableTable<R,C, V> TopKSelector<T>An accumulator that selects the "top"k
elements added to it, relative to a provided comparator.TransformedIterator<F,T> An iterator that transforms a backing iterator; for internal use.An iterator that transforms a backing list iterator; for internal use.TreeBasedTable<R,C, V> Implementation ofTable
whose row keys and column keys are ordered by their natural ordering or by supplied comparators.TreeMultimap<K,V> Implementation ofMultimap
whose keys and values are ordered by their natural ordering or by supplied comparators.TreeMultiset<E>A multiset which maintains the ordering of its elements, according to either their natural order or an explicitComparator
.A function which can be summed across a subtree.An implementation ofRangeMap
based on aTreeMap
, supporting all optional operations.TreeRangeSet<C extends Comparable<?>>TreeRangeSet.ComplementRangesByLowerBound<C extends Comparable<?>>TreeRangeSet.RangesByUpperBound<C extends Comparable<?>>TreeRangeSet.SubRangeSetRangesByLowerBound<C extends Comparable<?>>Deprecated.UseTraverser
instead.An iterator that does not supportUnmodifiableIterator.remove()
.A list iterator that does not supportUnmodifiableIterator.remove()
,UnmodifiableListIterator.add(E)
, orUnmodifiableListIterator.set(E)
.Implementation ofMultisets.unmodifiableSortedMultiset(SortedMultiset)
, split out into its own file so it can be GWT emulated (to deal with the differing elementSet() types in GWT and non-GWT).An ordering that uses the natural order of the string representation of the values.
com.google.common
.