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
Mapwhose 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
Mapinstances.This class provides a skeletal implementation of theListIteratorinterface across a fixed number of elements that may be retrieved by position.This class provides a skeletal implementation of theIteratorinterface, to make this interface easier to implement for certain types of data sources.Basic implementation of theListMultimapinterface.Basic implementation of theMultimapinterface.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, andtoStringmethods ofEntry.A skeletonMultimapimplementation, not necessarily in terms of aMap.This class provides a skeletal implementation of theMultisetinterface.Skeletal implementation ofNavigableMap.A skeletal implementation ofRangeSet.Basic implementation of theSetMultimapinterface.Basic implementation of aSortedSetMultimapwith a sorted key set.This class provides a skeletal implementation of theSortedMultisetinterface.Basic implementation of theSortedSetMultimapinterface.Skeletal, implementation-agnostic implementation of theTableinterface.An ordering that treats all references as equals, even nulls.Implementation ofMultimapthat uses anArrayListto store the values for a given key.A dummy superclass to support GWT serialization of the element types of anArrayListMultimap.Fixed-sizeTableimplementation backed by a two-dimensional array.A dummy superclass ofImmutableMultimapthat 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 theoperation on spliterators.invalid reference
Stream#flatMapFactory for constructingCollectSpliterators.FlatMapSpliteratorinstances.Implementation ofwith a primitive spliterator output type.invalid reference
Stream#flatMapCompactHashMap 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 mostMultisetoperations (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 ofRangeinstances.An immutable map implementation backed by an indexed nullable array.A skeleton implementation of a descending multiset.A descriptor for a discreteComparabledomain such as allIntegerinstances.Marks all "top-level" types as non-null in a way that is recognized by Kotlin.Implementation ofImmutableListMultimapwith no entries.Implementation ofImmutableListMultimapwith no entries.ABiMapbacked by twoEnumMapinstances.ABiMapbacked by anEnumMapinstance for keys-to-values, and aHashMapinstance 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 filteredSetMultimapimplementations.A discouraged (but not deprecated) precursor to Java's superiorStreamlibrary.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 forto work around build-system quirks.invalid reference
com.google.gwt.user.client.rpc.GwtTransientImplementation ofTableusing linked hash tables.ABiMapbacked by two hash tables.Implementation ofMultimapusing 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 delegatescontainschecks to the backing collection.ABiMapwhose contents will never change, with many other important properties detailed atImmutableCollection.A builder for creating immutable bimap instances, especiallypublic static finalbimaps ("constant bimaps").AClassToInstanceMapwhose contents will never change, with many other important properties detailed atImmutableCollection.A builder for creating immutable class-to-instance maps.ACollectionwhose contents will never change, and which offers a few additional guarantees detailed below.Abstract base class for builders ofImmutableCollectiontypes.An immutableMap.Entry, used both byMaps.immutableEntry(Object, Object)and by other parts ofcommon.collectas a superclass.AListwhose contents will never change, with many other important properties detailed atImmutableCollection.A builder for creating immutable list instances, especiallypublic static finallists ("constant lists").AListMultimapwhose contents will never change, with many other important properties detailed atImmutableCollection.A builder for creating immutableListMultimapinstances, especiallypublic static finalmultimaps ("constant multimaps").AMapwhose contents will never change, with many other important properties detailed atImmutableCollection.A builder for creating immutable map instances, especiallypublic static finalmaps ("constant maps").Serialized type for all ImmutableMap instances.Implementation ofEntryforImmutableMapthat adds extra methods to traverse hash buckets for the key and the value.entrySet()implementation forImmutableMap.AMultimapwhose contents will never change, with many other important properties detailed atImmutableCollection.A builder for creating immutable multimap instances, especiallypublic static finalmultimaps ("constant multimaps").AMultisetwhose contents will never change, with many other important properties detailed atImmutableCollection.A builder for creating immutable multiset instances, especiallypublic static finalmultisets ("constant multisets").A dummy superclass to support GWT serialization of the element type of anImmutableMultiset.ARangeMapwhose contents will never change, with many other important properties detailed atImmutableCollection.A builder for immutable range maps.ARangeSetwhose contents will never change, with many other important properties detailed atImmutableCollection.A builder for immutable range sets.ASetwhose contents will never change, with many other important properties detailed atImmutableCollection.A builder for creatingImmutableSetinstances.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.ASetMultimapwhose contents will never change, with many other important properties detailed atImmutableCollection.A builder for creating immutableSetMultimapinstances, especiallypublic static finalmultimaps ("constant multimaps").ANavigableMapwhose contents will never change, with many other important properties detailed atImmutableCollection.A builder for creating immutable sorted map instances, especiallypublic static finalmaps ("constant maps").ASortedMultisetwhose contents will never change, with many other important properties detailed atImmutableCollection.A builder for creating immutable multiset instances, especiallypublic static finalmultisets ("constant multisets").ANavigableSetwhose contents will never change, with many other important properties detailed atImmutableCollection.A builder for creating immutable sorted set instances, especiallypublic static finalsets ("constant sets"), with a given comparator.ATablewhose contents will never change, with many other important properties detailed atImmutableCollection.A builder for creating immutable table instances, especiallypublic static finaltables ("constant tables").Serialized type for all ImmutableTable instances.Provides similar behavior toString.intern()for any immutable type.Builder forInternerinstances.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 ofMultimapthat 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.AMultisetimplementation with predictable iteration order.An implementation ofListMultimapthat supports deterministic iteration order for both keys and values.AMultimapthat 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 ofConcurrentMapinstances 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.InternalEntryimplementations for strong keys.Base class forMapMakerInternalMap.InternalEntryimplementations for weak keys.A dummy implementation ofMapMakerInternalMap.InternalEntry, solely for use in the type signature ofMapMakerInternalMap.UNSET_WEAK_VALUE_REFERENCEbelow.An entry in a hash table of aMapMakerInternalMap.Segment.A helper object for operating onMapMakerInternalMap.InternalEntryinstances in a type-safe and efficient manner.Segments are specialized versions of hash tables.Concrete implementation ofMapMakerInternalMap.InternalEntryfor strong keys andMapMaker.Dummyvalues.Concrete implementation ofMapMakerInternalMap.InternalEntryHelperfor strong keys andMapMaker.Dummyvalues.Concrete implementation ofMapMakerInternalMap.Segmentfor strong keys andMapMaker.Dummyvalues.Concrete implementation ofMapMakerInternalMap.InternalEntryfor strong keys and strong values.Concrete implementation ofMapMakerInternalMap.InternalEntryHelperfor strong keys and strong values.Concrete implementation ofMapMakerInternalMap.Segmentfor strong keys and strong values.Concrete implementation ofMapMakerInternalMap.InternalEntryfor strong keys and weak values.Concrete implementation ofMapMakerInternalMap.InternalEntryHelperfor strong keys and weak values.Concrete implementation ofMapMakerInternalMap.Segmentfor strong keys and weak values.Marker interface forMapMakerInternalMap.InternalEntryimplementations for strong values.Concrete implementation ofMapMakerInternalMap.InternalEntryfor weak keys andMapMaker.Dummyvalues.Concrete implementation ofMapMakerInternalMap.InternalEntryHelperfor weak keys andMapMaker.Dummyvalues.Concrete implementation ofMapMakerInternalMap.Segmentfor weak keys andMapMaker.Dummyvalues.Concrete implementation ofMapMakerInternalMap.InternalEntryfor weak keys and strong values.Concrete implementation ofMapMakerInternalMap.InternalEntryHelperfor weak keys and strong values.Concrete implementation ofMapMakerInternalMap.Segmentfor weak keys and strong values.Concrete implementation ofMapMakerInternalMap.InternalEntryfor weak keys and weak values.Concrete implementation ofMapMakerInternalMap.InternalEntryHelperfor weak keys and weak values.Concrete implementation ofMapMakerInternalMap.Segmentfor weak keys and weak values.Marker interface forMapMakerInternalMap.InternalEntryimplementations 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>>).AbstractMapextension 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 forMultimapinstances, letting you independently select the desired behaviors (for example, ordering) of the backing map and value-collections.A specialization ofMultimapBuilderthat generatesListMultimapinstances.An intermediate stage in aMultimapBuilderin which the key-value collection map implementation has been specified, but the value collection implementation has not.A specialization ofMultimapBuilderthat generatesSetMultimapinstances.A specialization ofMultimapBuilderthat generatesSortedSetMultimapinstances.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.AnAbstractMultisetwith additional default implementations, some of them linear-time implementations in terms ofelementSetandentrySet.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 someComparabletype; 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.AnImmutableAsListimplementation specialized for when the delegate collection is already backed by anImmutableListor array.Bimap with zero or more mappings.Implementation ofImmutableMapused for 0 entries and for 2+ entries.Implementation ofImmutableSetwith two or more elements.An immutable sorted set with one or more elements.An implementation ofImmutableTableholding an arbitrary number of cells.An ordering that uses the reverse of the natural order of the values.Interface that extendsTableand whose rows are sorted.AMultimapthat cannot hold duplicate key-value pairs.AbstractSetsubstitute without the potentially-quadraticremoveAllimplementation.An unmodifiable view of a set which may be backed by other sets; this view will change as the backing sets do.AnIterablewhose 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.AMultisetwhich maintains the ordering of its elements, according to either their natural order or an explicitComparator.Superinterface ofSortedMultisetto 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().ASetMultimapwhose set of values for a given key are kept sorted; that is, they comprise aSortedSet.Implementation ofTablewhose iteration ordering across row keys is sorted by their natural ordering or by a supplied comparator.Tableimplementation 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 ofDoubleFunctionalso accepting an index.An analogue ofFunctionalso accepting an index.An analogue ofIntFunctionalso accepting an index.An analogue ofLongFunctionalso 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"kelements added to it, relative to a provided comparator.An iterator that transforms a backing iterator; for internal use.Implementation ofTablewhose row keys and column keys are ordered by their natural ordering or by supplied comparators.Implementation ofMultimapwhose 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 ofRangeMapbased 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
Setwhose 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.AMultimapwhose contents will never change, with many other important properties detailed atImmutableCollection.AMultimapthat 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.AMultimapthat cannot hold duplicate key-value pairs.AMultisetwhich 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
Listwhose contents will never change, with many other important properties detailed atImmutableCollection.ASetwhose 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
Iteratorinterface, 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.AMapwhose contents will never change, with many other important properties detailed atImmutableCollection.ASetwhose 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
Listwhose contents will never change, with many other important properties detailed atImmutableCollection.ASetwhose contents will never change, with many other important properties detailed atImmutableCollection. -
Classes in com.google.common.collect used by com.google.common.netClassDescriptionA
Listwhose contents will never change, with many other important properties detailed atImmutableCollection.AListMultimapwhose contents will never change, with many other important properties detailed atImmutableCollection.AMultisetwhose 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
Listwhose contents will never change, with many other important properties detailed atImmutableCollection.AMapwhose contents will never change, with many other important properties detailed atImmutableCollection.A builder for creating immutable map instances, especiallypublic static finalmaps ("constant maps").ASetwhose contents will never change, with many other important properties detailed atImmutableCollection.A builder for creatingImmutableSetinstances. -
Classes in com.google.common.collect used by com.google.common.testingClassDescriptionImplementation of
Multimapthat uses anArrayListto 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 ofTableusing linked hash tables.ABiMapbacked by two hash tables.Implementation ofMultimapusing hash tables.Multiset implementation backed by aHashMap.ABiMapwhose contents will never change, with many other important properties detailed atImmutableCollection.ACollectionwhose contents will never change, and which offers a few additional guarantees detailed below.AListwhose contents will never change, with many other important properties detailed atImmutableCollection.AListMultimapwhose contents will never change, with many other important properties detailed atImmutableCollection.AMapwhose contents will never change, with many other important properties detailed atImmutableCollection.AMultimapwhose contents will never change, with many other important properties detailed atImmutableCollection.AMultisetwhose contents will never change, with many other important properties detailed atImmutableCollection.ASetwhose contents will never change, with many other important properties detailed atImmutableCollection.ASetMultimapwhose contents will never change, with many other important properties detailed atImmutableCollection.ANavigableMapwhose contents will never change, with many other important properties detailed atImmutableCollection.ASortedMultisetwhose contents will never change, with many other important properties detailed atImmutableCollection.ANavigableSetwhose contents will never change, with many other important properties detailed atImmutableCollection.ATablewhose contents will never change, with many other important properties detailed atImmutableCollection.Implementation ofMultimapthat 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.AMultisetimplementation with predictable iteration order.AMultimapthat 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 someComparabletype; for example, "integers from 1 to 100 inclusive." Note that it is not possible to iterate over these contained values.Interface that extendsTableand whose rows are sorted.AMultimapthat cannot hold duplicate key-value pairs.AMultisetwhich 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 ofTablewhose 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
Collectionwhose contents will never change, and which offers a few additional guarantees detailed below.AListwhose contents will never change, with many other important properties detailed atImmutableCollection.AMapwhose contents will never change, with many other important properties detailed atImmutableCollection.AMultimapwhose contents will never change, with many other important properties detailed atImmutableCollection.ASetwhose contents will never change, with many other important properties detailed atImmutableCollection.ASetMultimapwhose 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.AMultimapthat 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
Mapwhose contents will never change, with many other important properties detailed atImmutableCollection.A builder for creating immutable map instances, especiallypublic static finalmaps ("constant maps").
Traverserinstead.