Uses of Package
com.google.common.collect
Packages that use com.google.common.collect
Package
Description
Discouraged (in favor of Caffeine) caching utilities.
Collection interfaces and implementations, and other utilities for collections.
Discouraged in favor of dependency injection and
concurrency frameworks, EventBus allows publish-subscribe-style communication.
An API for representing graph (node and edge) data.
Utility methods and classes for I/O; for example input streams, output streams, readers, writers,
and files.
Utility methods and classes for networking (such as IP addresses and domain names).
Utilities for reflection.
Testing utilities.
Concurrency utilities.
-
Classes in com.google.common.collect used by com.google.common.cacheClassDescriptionAn abstract base class for implementing the decorator pattern.A
Map
whose contents will never change, with many other important properties detailed atImmutableCollection
. -
Classes in com.google.common.collect used by com.google.common.collectClassDescriptionA general-purpose bimap implementation using any two backing
Map
instances.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.Basic implementation of theListMultimap
interface.Basic implementation of theMultimap
interface.Collection decorator that stays in sync with the multimap values for a key.Collection iterator forWrappedCollection
.List decorator that stays in sync with the multimap values for a key.SortedSet decorator that stays in sync with the multimap values for a key.Basic implementation ofMultiset<E>
backed by an instance ofMap<E, Count>
.Implementation of theequals
,hashCode
, andtoString
methods ofEntry
.A skeletonMultimap
implementation, not necessarily in terms of aMap
.This class provides a skeletal implementation of theMultiset
interface.Skeletal implementation ofNavigableMap
.A skeletal implementation ofRangeSet
.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.Skeletal, implementation-agnostic implementation of theTable
interface.An ordering that treats all references as equals, even nulls.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
.Fixed-sizeTable
implementation backed by a two-dimensional array.A dummy superclass ofImmutableMultimap
that can be instanceof'd without ProGuard retaining additional implementation details ofImmutableMultimap
.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").Implementation ofLists.cartesianProduct(List)
.A map, each entry of which maps a Java raw type to an instance of that type.Implements theinvalid reference
Stream#flatMap
Factory for constructingCollectSpliterators.FlatMapSpliterator
instances.Implementation ofinvalid reference
Stream#flatMap
CompactHashMap is an implementation of a Map.CompactHashSet is an implementation of a Set.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.A utility for performing a chained comparison statement.A multiset that supports concurrent modifications and that provides atomic versions of mostMultiset
operations (exceptions where noted).A sorted set of contiguous values in a givenDiscreteDomain
.A mutable value of typeint
, for multisets to use in tracking counts of values.Implementation detail for the internal structure ofRange
instances.An immutable map implementation backed by an indexed nullable array.A skeleton implementation of a descending multiset.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.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.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.Implementation ofMultimaps.filterEntries(Multimap, Predicate)
.Implementation ofMultimaps.filterKeys(Multimap, Predicate)
.An interface for all filtered multimap types.A supertype for filteredSetMultimap
implementations.A discouraged (but not deprecated) precursor to Java's superiorStream
library.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.An iterator which forwards all its method calls to another iterator.A list which forwards all its method calls to another list.A map which forwards all its method calls to another map.A map entry which forwards all its method calls to another map entry.A multimap which forwards all its method calls to another multimap.A multiset which forwards all its method calls to another multiset.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.A sorted map which forwards all its method calls to another sorted map.A sorted set which forwards all its method calls to another sorted set.A table which forwards all its method calls to another table.A generalized interval on any ordering, for internal use.Private replacement forinvalid reference
com.google.gwt.user.client.rpc.GwtTransient
Implementation ofTable
using linked hash tables.ABiMap
backed by two hash tables.Implementation ofMultimap
using hash tables.A dummy superclass to support GWT serialization of the element types of aHashMultimap
.Multiset implementation backed by aHashMap
.List returned byImmutableCollection.asList()
that delegatescontains
checks to the backing collection.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").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.An immutableMap.Entry
, used both byMaps.immutableEntry(Object, Object)
and by other parts ofcommon.collect
as a superclass.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").AMap
whose contents will never change, with many other important properties detailed atImmutableCollection
.A builder for creating immutable map instances, especiallypublic static final
maps ("constant maps").Serialized type for all ImmutableMap instances.Implementation ofEntry
forImmutableMap
that adds extra methods to traverse hash buckets for the key and the value.entrySet()
implementation forImmutableMap
.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.ARangeSet
whose contents will never change, with many other important properties detailed atImmutableCollection
.A builder for immutable range sets.ASet
whose contents will never change, with many other important properties detailed atImmutableCollection
.A builder for creatingImmutableSet
instances.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.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").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").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.ATable
whose contents will never change, with many other important properties detailed atImmutableCollection
.A builder for creating immutable table instances, especiallypublic static final
tables ("constant tables").Serialized type for all ImmutableTable instances.Provides similar behavior toString.intern()
for any immutable type.Builder forInterner
instances.This is an enum singleton rather than an anonymous class so ProGuard can figure out it's only referenced by emptyModifiableIterator().Implementation of ImmutableBiMap backed by a pair of JDK HashMaps, which have smartness protecting against hash flooding.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.An implementation ofListMultimap
that supports deterministic iteration order for both keys and values.AMultimap
that can hold duplicate key-value pairs and that maintains the insertion ordering of values for a given key.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
.The concurrent hash map implementation built byMapMaker
.The actual object that gets serialized.Base class forMapMakerInternalMap.InternalEntry
implementations for strong keys.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.An entry in a hash table of aMapMakerInternalMap.Segment
.A helper object for operating onMapMakerInternalMap.InternalEntry
instances in a type-safe and efficient manner.Segments are specialized versions of hash tables.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.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.Marker interface forMapMakerInternalMap.InternalEntry
implementations for weak values.A weakly referenced value that also has a reference to its containing entry.Custom Entry class used by EntryIterator.next(), that relays setValue changes to the underlying map.A transformation of the value of a key-value pair, using both key and value as inputs.The implementation ofMultimaps.unmodifiableEntries(java.util.Collection<java.util.Map.Entry<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.Each instance of MinMaxPriorityQueue encapsulates two instances of Heap: a min-heap and a max-heap.This atrocity is here to let us report several of the elements in the stream if there were more than one, not just two.A collection that maps keys to values, similar toMap
, but in which each key may be associated with multiple values.An immutable builder forMultimap
instances, letting you independently select the desired behaviors (for example, ordering) of the backing map and value-collections.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.A skeleton implementation ofMultimap.entries()
.A collection that supports order-independent equality, likeSet
, but may have duplicate elements.An unmodifiable element-count pair for a multiset.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.An ordering that uses the natural order of the values.A comparator, with additional methods to support common operations.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.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.A dummy superclass to support GWT serialization of the element type of aRange
.A mapping from disjoint nonempty ranges to non-null values.AnImmutableAsList
implementation specialized for when the delegate collection is already backed by anImmutableList
or array.Bimap with zero or more mappings.Implementation ofImmutableMap
used for 0 entries and for 2+ entries.Implementation ofImmutableSet
with two or more elements.An immutable sorted set with one or more elements.An implementation ofImmutableTable
holding an arbitrary number of cells.An ordering that uses the reverse of the natural order of the values.Interface that extendsTable
and whose rows are sorted.AMultimap
that cannot hold duplicate key-value pairs.AbstractSet
substitute without the potentially-quadraticremoveAll
implementation.An unmodifiable view of a set which may be backed by other sets; this view will change as the backing sets do.AnIterable
whose elements are sorted relative to aComparator
, typically provided at creation time.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.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
.A skeleton implementation forSortedMultiset.elementSet()
.A skeleton navigable implementation forSortedMultiset.elementSet()
.ASetMultimap
whose set of values for a given key are kept sorted; that is, they comprise aSortedSet
.Implementation ofTable
whose iteration ordering across row keys is sorted by their natural ordering or by a supplied comparator.Table
implementation backed by a map that associates row keys with column key / value secondary maps.Abstract set whoseisEmpty()
returns whether the table is empty and whoseclear()
clears all table mappings.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.A collection that associates an ordered pair of keys, called a row key and a column key, with a single value.Row key / column key / value triplet corresponding to a mapping in a table.An accumulator that selects the "top"k
elements added to it, relative to a provided comparator.An iterator that transforms a backing iterator; for internal use.Implementation ofTable
whose row keys and column keys are ordered by their natural ordering or by supplied comparators.Implementation ofMultimap
whose keys and values are ordered by their natural ordering or by supplied comparators.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.Deprecated.Deprecated.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. -
Classes in com.google.common.collect used by com.google.common.collect.testingClassDescriptionA
Set
whose contents will never change, with many other important properties detailed atImmutableCollection
. -
Classes in com.google.common.collect used by com.google.common.collect.testing.googleClassDescriptionA bimap (or "bidirectional map") is a map that preserves the uniqueness of its values as well as that of its keys.A sorted set of contiguous values in a given
DiscreteDomain
.AMultimap
whose contents will never change, with many other important properties detailed atImmutableCollection
.AMultimap
that can hold duplicate key-value pairs and that maintains the insertion ordering of values for a given key.A collection that maps keys to values, similar toMap
, but in which each key may be associated with multiple values.A collection that supports order-independent equality, likeSet
, but may have duplicate elements.An unmodifiable element-count pair for a multiset.A comparator, with additional methods to support common operations.AMultimap
that cannot hold duplicate key-value pairs.AMultiset
which maintains the ordering of its elements, according to either their natural order or an explicitComparator
. -
Classes in com.google.common.collect used by com.google.common.eventbusClassDescriptionA
List
whose contents will never change, with many other important properties detailed atImmutableCollection
.ASet
whose contents will never change, with many other important properties detailed atImmutableCollection
.A collection that maps keys to values, similar toMap
, but in which each key may be associated with multiple values. -
Classes in com.google.common.collect used by com.google.common.graphClassDescriptionThis class provides a skeletal implementation of the
Iterator
interface, to make this interface easier to implement for certain types of data sources.A collection which forwards all its method calls to another collection.An abstract base class for implementing the decorator pattern.A set which forwards all its method calls to another set.AMap
whose contents will never change, with many other important properties detailed atImmutableCollection
.ASet
whose contents will never change, with many other important properties detailed atImmutableCollection
.A collection that supports order-independent equality, likeSet
, but may have duplicate elements.An iterator that does not supportUnmodifiableIterator.remove()
. -
Classes in com.google.common.collect used by com.google.common.ioClassDescriptionA
List
whose contents will never change, with many other important properties detailed atImmutableCollection
.ASet
whose contents will never change, with many other important properties detailed atImmutableCollection
. -
Classes in com.google.common.collect used by com.google.common.netClassDescriptionA
List
whose contents will never change, with many other important properties detailed atImmutableCollection
.AListMultimap
whose contents will never change, with many other important properties detailed atImmutableCollection
.AMultiset
whose contents will never change, with many other important properties detailed atImmutableCollection
.A collection that maps keys to values, similar toMap
, but in which each key may be associated with multiple values. -
Classes in com.google.common.collect used by com.google.common.reflectClassDescriptionA collection which forwards all its method calls to another collection.A map which forwards all its method calls to another map.A map entry which forwards all its method calls to another map entry.An abstract base class for implementing the decorator pattern.A set which forwards all its method calls to another set.A
List
whose contents will never change, with many other important properties detailed atImmutableCollection
.AMap
whose contents will never change, with many other important properties detailed atImmutableCollection
.A builder for creating immutable map instances, especiallypublic static final
maps ("constant maps").ASet
whose contents will never change, with many other important properties detailed atImmutableCollection
.A builder for creatingImmutableSet
instances. -
Classes in com.google.common.collect used by com.google.common.testingClassDescriptionImplementation of
Multimap
that uses anArrayList
to store the values for a given key.A bimap (or "bidirectional map") is a map that preserves the uniqueness of its values as well as that of its keys.A map, each entry of which maps a Java raw type to an instance of that type.Implementation ofTable
using linked hash tables.ABiMap
backed by two hash tables.Implementation ofMultimap
using hash tables.Multiset implementation backed by aHashMap
.ABiMap
whose contents will never change, with many other important properties detailed atImmutableCollection
.ACollection
whose contents will never change, and which offers a few additional guarantees detailed below.AList
whose contents will never change, with many other important properties detailed atImmutableCollection
.AListMultimap
whose contents will never change, with many other important properties detailed atImmutableCollection
.AMap
whose contents will never change, with many other important properties detailed atImmutableCollection
.AMultimap
whose contents will never change, with many other important properties detailed atImmutableCollection
.AMultiset
whose contents will never change, with many other important properties detailed atImmutableCollection
.ASet
whose contents will never change, with many other important properties detailed atImmutableCollection
.ASetMultimap
whose contents will never change, with many other important properties detailed atImmutableCollection
.ANavigableMap
whose contents will never change, with many other important properties detailed atImmutableCollection
.ASortedMultiset
whose contents will never change, with many other important properties detailed atImmutableCollection
.ANavigableSet
whose contents will never change, with many other important properties detailed atImmutableCollection
.ATable
whose contents will never change, with many other important properties detailed atImmutableCollection
.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.AMultiset
implementation with predictable iteration order.AMultimap
that can hold duplicate key-value pairs and that maintains the insertion ordering of values for a given key.A collection that maps keys to values, similar toMap
, but in which each key may be associated with multiple values.A collection that supports order-independent equality, likeSet
, but may have duplicate elements.A mutable class-to-instance map backed by an arbitrary user-provided map.A comparator, with additional methods to support common operations.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.Interface that extendsTable
and whose rows are sorted.AMultimap
that cannot hold duplicate key-value pairs.AMultiset
which maintains the ordering of its elements, according to either their natural order or an explicitComparator
.A collection that associates an ordered pair of keys, called a row key and a column key, with a single value.Implementation ofTable
whose row keys and column keys are ordered by their natural ordering or by supplied comparators.A multiset which maintains the ordering of its elements, according to either their natural order or an explicitComparator
. -
Classes in com.google.common.collect used by com.google.common.util.concurrentClassDescriptionA collection which forwards all its method calls to another collection.A deque which forwards all its method calls to another deque.An abstract base class for implementing the decorator pattern.A queue which forwards all its method calls to another queue.A
Collection
whose contents will never change, and which offers a few additional guarantees detailed below.AList
whose contents will never change, with many other important properties detailed atImmutableCollection
.AMap
whose contents will never change, with many other important properties detailed atImmutableCollection
.AMultimap
whose contents will never change, with many other important properties detailed atImmutableCollection
.ASet
whose contents will never change, with many other important properties detailed atImmutableCollection
.ASetMultimap
whose contents will never change, with many other important properties detailed atImmutableCollection
.A collection that supports order-independent equality, likeSet
, but may have duplicate elements.A comparator, with additional methods to support common operations.AMultimap
that cannot hold duplicate key-value pairs. -
Classes in com.google.common.collect used by com.google.common.util.concurrent.testing
-
Classes in com.google.common.collect used by com.google.thirdparty.publicsuffixClassDescriptionA
Map
whose contents will never change, with many other important properties detailed atImmutableCollection
.A builder for creating immutable map instances, especiallypublic static final
maps ("constant maps").
Traverser
instead.