Top Description Interfaces Annotations Classes Enums
[default module]

Package com.google.common.collect

Annotations
@CheckReturnValue
@ParametersAreNonnullByDefault
Imports
com.google.errorprone.annotations.CheckReturnValue, javax.annotation.ParametersAreNonnullByDefault

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 (see ImmutableCollection 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 java.util.Map, but may contain multiple entries with the same key. Some behaviors of Multimap 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 by ListMultimap#equals(Object). ListMultimap takes its name from the fact that the collection of values associated with a given key fulfills the java.util.List 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 a SetMultimap, 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 the java.util.Set contract.
SortedSetMultimap
An extension of SetMultimap for which the collection values associated with a given key is a java.util.SortedSet.
BiMap
An extension of java.util.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 of BiMap.
Table
A new type, which is similar to java.util.Map, but which indexes its values by an ordered pair of keys, a row key and column key.
Multiset
An extension of java.util.Collection that may contain duplicate values like a java.util.List, yet has order-independent equality like a java.util.Set. One typical use for a multiset is to represent a histogram.
ClassToInstanceMap
An extension of java.util.Map that associates a raw type with an instance of that type.

Ranges

Classes of static utility methods

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, see ForwardingCollection.

Other

Interface Summary

Modifier and TypeInterface and Description
public interface
BiMap<K extends @Nullable Object, V extends @Nullable Object>

A bimap (or "bidirectional map") is a map that preserves the uniqueness of its values as well as that of its keys.

public interface
ClassToInstanceMap<
the common supertype that all values will share. When in doubt, just use Object, or use @Nullable Object to allow null values.
B extends @Nullable Object
>

A map, each entry of which maps a Java raw type to an instance of that type.

pack-priv interface
FilteredMultimap<K extends @Nullable Object, V extends @Nullable Object>

An interface for all filtered multimap types.

pack-priv interface
FilteredSetMultimap<K extends @Nullable Object, V extends @Nullable Object>

A supertype for filtered SetMultimap implementations.

public interface
Interner<E>

Provides similar behavior to String#intern for any immutable type.

public interface
ListMultimap<K extends @Nullable Object, V extends @Nullable Object>

A Multimap that can hold duplicate key-value pairs and that maintains the insertion ordering of values for a given key.

public interface
MapDifference<K extends @Nullable Object, V extends @Nullable Object>

An object representing the differences between two maps.

public interface
Multimap<K extends @Nullable Object, V extends @Nullable Object>

A collection that maps keys to values, similar to Map, but in which each key may be associated with multiple values.

public interface
Multiset<E extends @Nullable Object>

A collection that supports order-independent equality, like Set, but may have duplicate elements.

public interface
PeekingIterator<E extends @Nullable Object>

An iterator that supports a one-element lookahead while iterating.

public interface
RangeMap<K extends Comparable<T>, V>

A mapping from disjoint nonempty ranges to non-null values.

public interface
RangeSet<C extends Comparable<T>>

A set comprising zero or more nonempty, disconnected ranges of type C.

public interface
RowSortedTable<R extends @Nullable Object, C extends @Nullable Object, V extends @Nullable Object>

Interface that extends Table and whose rows are sorted.

public interface
SetMultimap<K extends @Nullable Object, V extends @Nullable Object>

A Multimap that cannot hold duplicate key-value pairs.

pack-priv interface
SortedIterable<T extends @Nullable Object>

An Iterable whose elements are sorted relative to a Comparator, typically provided at creation time.

public interface
SortedMapDifference<K extends @Nullable Object, V extends @Nullable Object>

An object representing the differences between two sorted maps.

public interface
SortedMultiset<E extends @Nullable Object>

A Multiset which maintains the ordering of its elements, according to either their natural order or an explicit Comparator.

pack-priv interface
SortedMultisetBridge<E extends @Nullable Object>

Superinterface of SortedMultiset to introduce a bridge method for elementSet(), to ensure binary compatibility with older Guava versions that specified elementSet() to return SortedSet.

public interface
SortedSetMultimap<K extends @Nullable Object, V extends @Nullable Object>

A SetMultimap whose set of values for a given key are kept sorted; that is, they comprise a SortedSet.

public interface
Table<
the type of the table row keys
R extends @Nullable Object
,
the type of the table column keys
C extends @Nullable Object
,
the type of the mapped values
V extends @Nullable Object
>

A collection that associates an ordered pair of keys, called a row key and a column key, with a single value.

Annotation Summary

Modifier and TypeAnnotation and Description
pack-priv @interface
ElementTypesAreNonnullByDefault

Marks all "top-level" types as non-null in a way that is recognized by Kotlin.

pack-priv @interface
GwtTransient

Private replacement for com.google.gwt.user.client.rpc.GwtTransient to work around build-system quirks.

pack-priv @interface
IgnoreJRERequirement

Disables Animal Sniffer's checking of compatibility with older versions of Java/Android.

pack-priv @interface
ParametricNullness

Annotates a "top-level" type-variable usage that takes its nullness from the type argument supplied by the user of the class.

Class Summary

Modifier and TypeClass and Description
pack-priv abstract class
AbstractBiMap<K extends @Nullable Object, V extends @Nullable Object>

A general-purpose bimap implementation using any two backing Map instances.

pack-priv abstract class
AbstractIndexedListIterator<E extends @Nullable Object>

This class provides a skeletal implementation of the ListIterator interface across a fixed number of elements that may be retrieved by position.

public abstract class
AbstractIterator<T extends @Nullable Object>

This class provides a skeletal implementation of the Iterator interface, to make this interface easier to implement for certain types of data sources.

pack-priv abstract class
AbstractListMultimap<K extends @Nullable Object, V extends @Nullable Object>

Basic implementation of the ListMultimap interface.

pack-priv abstract class
AbstractMapBasedMultimap<K extends @Nullable Object, V extends @Nullable Object>

Basic implementation of the Multimap interface.

pack-priv abstract class
AbstractMapBasedMultiset<E extends @Nullable Object>

Basic implementation of Multiset<E> backed by an instance of Map<E, Count>.

pack-priv abstract class
AbstractMapEntry<K extends @Nullable Object, V extends @Nullable Object>

Implementation of the equals, hashCode, and toString methods of Entry.

pack-priv abstract class
AbstractMultimap<K extends @Nullable Object, V extends @Nullable Object>

A skeleton Multimap implementation, not necessarily in terms of a Map.

pack-priv abstract class
AbstractMultiset<E extends @Nullable Object>

This class provides a skeletal implementation of the Multiset interface.

pack-priv abstract class
AbstractNavigableMap<K extends @Nullable Object, V extends @Nullable Object>

Skeletal implementation of NavigableMap.

pack-priv abstract class
AbstractRangeSet<C extends Comparable<T>>

A skeletal implementation of RangeSet.

public abstract class
AbstractSequentialIterator<T>

This class provides a skeletal implementation of the Iterator interface for sequences whose next element can always be derived from the previous element.

pack-priv abstract class
AbstractSetMultimap<K extends @Nullable Object, V extends @Nullable Object>

Basic implementation of the SetMultimap interface.

pack-priv abstract class
AbstractSortedKeySortedSetMultimap<K extends @Nullable Object, V extends @Nullable Object>

Basic implementation of a SortedSetMultimap with a sorted key set.

pack-priv abstract class
AbstractSortedMultiset<E extends @Nullable Object>

This class provides a skeletal implementation of the SortedMultiset interface.

pack-priv abstract class
AbstractSortedSetMultimap<K extends @Nullable Object, V extends @Nullable Object>

Basic implementation of the SortedSetMultimap interface.

pack-priv abstract class
AbstractTable<R extends @Nullable Object, C extends @Nullable Object, V extends @Nullable Object>

Skeletal, implementation-agnostic implementation of the Table interface.

pack-priv class
AllEqualOrdering

An ordering that treats all references as equals, even nulls.

public class
ArrayListMultimap<K extends @Nullable Object, V extends @Nullable Object>

Implementation of Multimap that uses an ArrayList to store the values for a given key.

pack-priv abstract class
ArrayListMultimapGwtSerializationDependencies<K, V>

A dummy superclass to support GWT serialization of the element types of an ArrayListMultimap.

public class
ArrayTable<R, C, V>

Fixed-size Table implementation backed by a two-dimensional array.

pack-priv abstract class
BaseImmutableMultimap<K, V>

A dummy superclass of ImmutableMultimap that can be instanceof'd without ProGuard retaining additional implementation details of ImmutableMultimap.

pack-priv class
ByFunctionOrdering<F extends @Nullable Object, T extends @Nullable Object>

An ordering that orders elements by applying an order to the result of a function on those elements.

pack-priv class
pack-priv class
CollectCollectors

Collectors utilities for common.collect internals.

public class
Collections2

Provides static methods for working with Collection instances.

pack-priv class
CollectPreconditions

Precondition checks useful in collection implementations.

pack-priv class
CollectSpliterators

Spliterator utilities for common.collect internals.

pack-priv class
CompactHashing

Helper classes and static methods for implementing compact hash-based collections.

pack-priv class
CompactHashMap<K extends @Nullable Object, V extends @Nullable Object>

CompactHashMap is an implementation of a Map.

pack-priv class
CompactHashSet<E extends @Nullable Object>

CompactHashSet is an implementation of a Set.

pack-priv class
CompactLinkedHashMap<K extends @Nullable Object, V extends @Nullable Object>

CompactLinkedHashMap is an implementation of a Map with insertion or LRU iteration order, maintained with a doubly linked list through the entries.

pack-priv class
CompactLinkedHashSet<E extends @Nullable Object>

CompactLinkedHashSet is an implementation of a Set, which a predictable iteration order that matches the insertion order.

pack-priv class
ComparatorOrdering<T extends @Nullable Object>

An ordering for a pre-existing comparator.

public class
Comparators

Provides static methods for working with Comparator instances.

public abstract class
ComparisonChain

A utility for performing a chained comparison statement

Note

Java 8+ users should generally prefer the methods in Comparator; see below.

pack-priv class
CompoundOrdering<T extends @Nullable Object>

An ordering that tries several comparators in order.

public class
ComputationException

Deprecated This exception is no longer thrown by com.google.common.
Wraps an exception that occurred during a computation.
public class
ConcurrentHashMultiset<E>

A multiset that supports concurrent modifications and that provides atomic versions of most Multiset operations (exceptions where noted).

pack-priv class
ConsumingQueueIterator<T extends @Nullable Object>

An Iterator implementation which draws elements from a queue, removing them from the queue as it iterates.

public abstract class
ContiguousSet<C extends Comparable<T>>

A sorted set of contiguous values in a given DiscreteDomain.

pack-priv class
Count

A mutable value of type int, for multisets to use in tracking counts of values.

pack-priv abstract class
Cut<C extends Comparable<T>>

Implementation detail for the internal structure of Range instances.

pack-priv class
DenseImmutableTable<R, C, V>

A RegularImmutableTable optimized for dense data.

pack-priv class
DescendingImmutableSortedMultiset<E>

A descending wrapper around an ImmutableSortedMultiset

pack-priv class
pack-priv abstract class
DescendingMultiset<E extends @Nullable Object>

A skeleton implementation of a descending multiset.

public abstract class
DiscreteDomain<C extends Comparable<T>>

A descriptor for a discrete Comparable domain such as all Integer instances.

pack-priv class
EmptyContiguousSet<C extends Comparable<T>>

An empty contiguous set.

pack-priv class
EmptyImmutableListMultimap

Implementation of ImmutableListMultimap with no entries.

pack-priv class
EmptyImmutableSetMultimap

Implementation of ImmutableListMultimap with no entries.

public class
EnumBiMap<K extends Enum<K>, V extends Enum<V>>

A BiMap backed by two EnumMap instances.

public class
EnumHashBiMap<K extends Enum<K>, V extends @Nullable Object>

A BiMap backed by an EnumMap instance for keys-to-values, and a HashMap instance for values-to-keys.

public class
EnumMultiset<E extends Enum<E>>

Multiset implementation specialized for enum elements, supporting all single-element operations in O(1).

public class
EvictingQueue<E>

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.

pack-priv class
ExplicitOrdering<T>

An ordering that compares objects according to a given order.

pack-priv class
pack-priv class
pack-priv class
pack-priv class
pack-priv class
pack-priv class
public abstract class
FluentIterable<E extends @Nullable Object>

A discouraged (but not deprecated) precursor to Java's superior Stream library.

public abstract class
ForwardingBlockingDeque<E>

Deprecated This class has moved to com.google.common.util.concurrent.
A BlockingDeque which forwards all its method calls to another BlockingDeque.
public abstract class
ForwardingCollection<E extends @Nullable Object>

A collection which forwards all its method calls to another collection.

public abstract class
ForwardingConcurrentMap<K, V>

A concurrent map which forwards all its method calls to another concurrent map.

public abstract class
ForwardingDeque<E extends @Nullable Object>

A deque which forwards all its method calls to another deque.

pack-priv class
ForwardingImmutableCollection

Dummy class that makes the GWT serialization policy happy.

pack-priv abstract class
ForwardingImmutableList<E>

Unused stub class, unreferenced under Java and manually emulated under GWT.

pack-priv abstract class
ForwardingImmutableMap<K, V>

Unused stub class, unreferenced under Java and manually emulated under GWT.

pack-priv abstract class
ForwardingImmutableSet<E>

Unused stub class, unreferenced under Java and manually emulated under GWT.

public abstract class
ForwardingIterator<T extends @Nullable Object>

An iterator which forwards all its method calls to another iterator.

public abstract class
ForwardingList<E extends @Nullable Object>

A list which forwards all its method calls to another list.

public abstract class
ForwardingListIterator<E extends @Nullable Object>

A list iterator which forwards all its method calls to another list iterator.

public abstract class
ForwardingListMultimap<K extends @Nullable Object, V extends @Nullable Object>

A list multimap which forwards all its method calls to another list multimap.

public abstract class
ForwardingMap<K extends @Nullable Object, V extends @Nullable Object>

A map which forwards all its method calls to another map.

public abstract class
ForwardingMapEntry<K extends @Nullable Object, V extends @Nullable Object>

A map entry which forwards all its method calls to another map entry.

public abstract class
ForwardingMultimap<K extends @Nullable Object, V extends @Nullable Object>

A multimap which forwards all its method calls to another multimap.

public abstract class
ForwardingMultiset<E extends @Nullable Object>

A multiset which forwards all its method calls to another multiset.

public abstract class
ForwardingNavigableMap<K extends @Nullable Object, V extends @Nullable Object>

A navigable map which forwards all its method calls to another navigable map.

public abstract class
ForwardingNavigableSet<E extends @Nullable Object>

A navigable set which forwards all its method calls to another navigable set.

public abstract class
ForwardingObject

An abstract base class for implementing the decorator pattern.

public abstract class
ForwardingQueue<E extends @Nullable Object>

A queue which forwards all its method calls to another queue.

public abstract class
ForwardingSet<E extends @Nullable Object>

A set which forwards all its method calls to another set.

public abstract class
ForwardingSetMultimap<K extends @Nullable Object, V extends @Nullable Object>

A set multimap which forwards all its method calls to another set multimap.

public abstract class
ForwardingSortedMap<K extends @Nullable Object, V extends @Nullable Object>

A sorted map which forwards all its method calls to another sorted map.

public abstract class
ForwardingSortedMultiset<E extends @Nullable Object>

A sorted multiset which forwards all its method calls to another sorted multiset.

public abstract class
ForwardingSortedSet<E extends @Nullable Object>

A sorted set which forwards all its method calls to another sorted set.

public abstract class
ForwardingSortedSetMultimap<K extends @Nullable Object, V extends @Nullable Object>

A sorted set multimap which forwards all its method calls to another sorted set multimap.

public abstract class
ForwardingTable<R extends @Nullable Object, C extends @Nullable Object, V extends @Nullable Object>

A table which forwards all its method calls to another table.

pack-priv class
GeneralRange<T extends @Nullable Object>

A generalized interval on any ordering, for internal use.

public class
HashBasedTable<R, C, V>

Implementation of Table using linked hash tables.

public class
HashBiMap<K extends @Nullable Object, V extends @Nullable Object>

A BiMap backed by two hash tables.

pack-priv class
Hashing

Static methods for implementing hash-based collections.

public class
HashMultimap<K extends @Nullable Object, V extends @Nullable Object>

Implementation of Multimap using hash tables.

pack-priv abstract class
HashMultimapGwtSerializationDependencies<K, V>

A dummy superclass to support GWT serialization of the element types of a HashMultimap.

public class
HashMultiset<E extends @Nullable Object>

Multiset implementation backed by a HashMap.

pack-priv abstract class
ImmutableAsList<E>

List returned by ImmutableCollection#asList that delegates contains checks to the backing collection.

public abstract class
ImmutableBiMap<K, V>

A BiMap whose contents will never change, with many other important properties detailed at ImmutableCollection.

public class
ImmutableClassToInstanceMap<B>

A ClassToInstanceMap whose contents will never change, with many other important properties detailed at ImmutableCollection.

public abstract class
ImmutableCollection<E>

A Collection whose contents will never change, and which offers a few additional guarantees detailed below.

pack-priv class
ImmutableEntry<K extends @Nullable Object, V extends @Nullable Object>

An immutable Map.Entry, used both by com.google.common.collect.Maps#immutableEntry(Object, Object) and by other parts of common.collect as a superclass.

pack-priv class
ImmutableEnumMap<K extends Enum<K>, V>

Implementation of ImmutableMap backed by a non-empty java.util.EnumMap.

pack-priv class
ImmutableEnumSet<E extends Enum<E>>

Implementation of ImmutableSet backed by a non-empty java.util.EnumSet.

public abstract class
ImmutableList<E>

A List whose contents will never change, with many other important properties detailed at ImmutableCollection.

public class
ImmutableListMultimap<K, V>

A ListMultimap whose contents will never change, with many other important properties detailed at ImmutableCollection.

public abstract class
ImmutableMap<K, V>

A Map whose contents will never change, with many other important properties detailed at ImmutableCollection.

pack-priv class
ImmutableMapEntry<K, V>

Implementation of Entry for ImmutableMap that adds extra methods to traverse hash buckets for the key and the value.

pack-priv abstract class
ImmutableMapEntrySet<K, V>

entrySet() implementation for ImmutableMap.

pack-priv class
ImmutableMapKeySet<K, V>

keySet() implementation for ImmutableMap.

pack-priv class
ImmutableMapValues<K, V>

values() implementation for ImmutableMap.

public abstract class
ImmutableMultimap<K, V>

A Multimap whose contents will never change, with many other important properties detailed at ImmutableCollection.

public abstract class
ImmutableMultiset<E>

A Multiset whose contents will never change, with many other important properties detailed at ImmutableCollection.

pack-priv abstract class
ImmutableMultisetGwtSerializationDependencies<E>

A dummy superclass to support GWT serialization of the element type of an ImmutableMultiset.

public class
ImmutableRangeMap<K extends Comparable<?>, V>

A RangeMap whose contents will never change, with many other important properties detailed at ImmutableCollection.

public class
ImmutableRangeSet<C extends Comparable<T>>

A RangeSet whose contents will never change, with many other important properties detailed at ImmutableCollection.

public abstract class
ImmutableSet<E>

A Set whose contents will never change, with many other important properties detailed at ImmutableCollection.

public class
ImmutableSetMultimap<K, V>

A SetMultimap whose contents will never change, with many other important properties detailed at ImmutableCollection.

pack-priv class
ImmutableSortedAsList<E>

List returned by ImmutableSortedSet.asList() when the set isn't empty.

public class
ImmutableSortedMap<K, V>

A NavigableMap whose contents will never change, with many other important properties detailed at ImmutableCollection.

public abstract class
ImmutableSortedMultiset<E>

A SortedMultiset whose contents will never change, with many other important properties detailed at ImmutableCollection.

public abstract class
ImmutableSortedSet<E>

A NavigableSet whose contents will never change, with many other important properties detailed at ImmutableCollection.

public abstract class
ImmutableTable<R, C, V>

A Table whose contents will never change, with many other important properties detailed at ImmutableCollection.

pack-priv abstract class
public class
Interners

Contains static methods pertaining to instances of Interner.

public class
Iterables

An assortment of mainly legacy static utility methods that operate on or return objects of type Iterable.

public class
Iterators

This class contains static utility methods that operate on or return objects of type Iterator.

pack-priv class
JdkBackedImmutableBiMap<K, V>

Implementation of ImmutableBiMap backed by a pair of JDK HashMaps, which have smartness protecting against hash flooding.

pack-priv class
JdkBackedImmutableMap<K, V>

Implementation of ImmutableMap backed by a JDK HashMap, which has smartness protecting against hash flooding.

pack-priv class
JdkBackedImmutableMultiset<E>

An implementation of ImmutableMultiset backed by a JDK Map and a list of entries.

pack-priv class
JdkBackedImmutableSet<E>

ImmutableSet implementation backed by a JDK HashSet, used to defend against apparent hash flooding.

pack-priv class
LexicographicalOrdering<T extends @Nullable Object>

An ordering which sorts iterables by comparing corresponding elements pairwise.

public class
LinkedHashMultimap<K extends @Nullable Object, V extends @Nullable Object>

Implementation of Multimap 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.

pack-priv abstract class
LinkedHashMultimapGwtSerializationDependencies<K, V>

A dummy superclass to support GWT serialization of the element types of a LinkedHashMultimap.

public class
LinkedHashMultiset<E extends @Nullable Object>

A Multiset implementation with predictable iteration order.

public class
LinkedListMultimap<K extends @Nullable Object, V extends @Nullable Object>

An implementation of ListMultimap that supports deterministic iteration order for both keys and values.

public class
Lists

Static utility methods pertaining to List instances.

public class
MapMaker

A builder of ConcurrentMap instances that can have keys or values automatically wrapped in weak references.

pack-priv class
MapMakerInternalMap<
the type of the keys in the map
K
,
the type of the values in the map
V
,
the type of the InternalEntry entry implementation used internally
E extends MapMakerInternalMap.InternalEntry<K, V, E>
,
the type of the Segment entry implementation used internally
S extends MapMakerInternalMap.Segment<K, V, E, S>
>

The concurrent hash map implementation built by MapMaker.

public class
Maps

Static utility methods pertaining to Map instances (including instances of SortedMap, BiMap, etc.).

public class
MinMaxPriorityQueue<E>

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.

public class
MoreCollectors

Collectors not present in java.util.stream.Collectors that are not otherwise associated with a com.google.common type.

public abstract class
MultimapBuilder<
An upper bound on the key type of the generated multimap.
K0 extends @Nullable Object
,
An upper bound on the value type of the generated multimap.
V0 extends @Nullable Object
>

An immutable builder for Multimap instances, letting you independently select the desired behaviors (for example, ordering) of the backing map and value-collections.

public class
Multimaps

Provides static methods acting on or generating a Multimap.

public class
Multisets

Provides static utility methods for creating and working with Multiset instances.

public class
MutableClassToInstanceMap<B extends @Nullable Object>

A mutable class-to-instance map backed by an arbitrary user-provided map.

pack-priv class
NaturalOrdering

An ordering that uses the natural order of the values.

pack-priv class
NullnessCasts

A utility method to perform unchecked casts to suppress errors produced by nullness analyses.

pack-priv class
NullsFirstOrdering<T extends @Nullable Object>

An ordering that treats null as less than all other values.

pack-priv class
NullsLastOrdering<T extends @Nullable Object>

An ordering that treats null as greater than all other values.

public class
ObjectArrays

Static utility methods pertaining to object arrays.

public abstract class
Ordering<T extends @Nullable Object>

A comparator, with additional methods to support common operations.

pack-priv class
Platform

Methods factored out so that they can be emulated differently in GWT.

public class
Queues

Static utility methods pertaining to Queue and Deque instances.

public class
Range<C extends Comparable<T>>

A range (or "interval") defines the boundaries around a contiguous span of values of some Comparable type; for example, "integers from 1 to 100 inclusive." Note that it is not possible to iterate over these contained values.

pack-priv abstract class
RangeGwtSerializationDependencies<C extends Comparable<T>>

A dummy superclass to support GWT serialization of the element type of a Range.

pack-priv class
RegularContiguousSet<C extends Comparable<T>>

An implementation of ContiguousSet that contains one or more elements.

pack-priv class
RegularImmutableAsList<E>

An ImmutableAsList implementation specialized for when the delegate collection is already backed by an ImmutableList or array.

pack-priv class
RegularImmutableBiMap<K, V>

Bimap with zero or more mappings.

pack-priv class
RegularImmutableList<E>

Implementation of ImmutableList backed by a simple array.

pack-priv class
RegularImmutableMap<K, V>

Implementation of ImmutableMap with two or more entries.

pack-priv class
RegularImmutableMultiset<E>

Implementation of ImmutableMultiset with zero or more elements.

pack-priv class
RegularImmutableSet<E>

Implementation of ImmutableSet with two or more elements.

pack-priv class
RegularImmutableSortedMultiset<E>

An immutable sorted multiset with one or more distinct elements.

pack-priv class
RegularImmutableSortedSet<E>

An immutable sorted set with one or more elements.

pack-priv abstract class
RegularImmutableTable<R, C, V>

An implementation of ImmutableTable holding an arbitrary number of cells.

pack-priv class
ReverseNaturalOrdering

An ordering that uses the reverse of the natural order of the values.

pack-priv class
ReverseOrdering<T extends @Nullable Object>

An ordering that uses the reverse of a given order.

pack-priv class
Serialization

Provides static methods for serializing collection classes.

public class
Sets

Static utility methods pertaining to Set instances.

pack-priv class
SingletonImmutableBiMap<K, V>

Implementation of ImmutableMap with exactly one entry.

pack-priv class
SingletonImmutableList<E>

Implementation of ImmutableList with exactly one element.

pack-priv class
SingletonImmutableSet<E>

Implementation of ImmutableSet with exactly one element.

pack-priv class
SingletonImmutableTable<R, C, V>

An implementation of ImmutableTable that holds a single cell.

pack-priv class
SortedIterables

Utilities for dealing with sorted collections of all types.

pack-priv class
SortedLists

Static methods pertaining to sorted List instances.

pack-priv class
SortedMultisets

Provides static utility methods for creating and working with SortedMultiset instances.

pack-priv class
SparseImmutableTable<R, C, V>

A RegularImmutableTable optimized for sparse data.

pack-priv class
StandardRowSortedTable<R, C, V>

Implementation of Table whose iteration ordering across row keys is sorted by their natural ordering or by a supplied comparator.

pack-priv class
StandardTable<R, C, V>

Table implementation backed by a map that associates row keys with column key / value secondary maps.

public class
Streams

Static utility methods related to Stream instances.

pack-priv class
Synchronized

Synchronized collection views.

pack-priv class
TableCollectors

Collectors utilities for common.collect.Table internals.

public class
Tables

Provides static methods that involve a Table.

pack-priv class
TopKSelector<T extends @Nullable Object>

An accumulator that selects the "top" k elements added to it, relative to a provided comparator.

pack-priv abstract class
TransformedIterator<F extends @Nullable Object, T extends @Nullable Object>

An iterator that transforms a backing iterator; for internal use.

pack-priv abstract class
TransformedListIterator<F extends @Nullable Object, T extends @Nullable Object>

An iterator that transforms a backing list iterator; for internal use.

public class
TreeBasedTable<R, C, V>

Implementation of Table whose row keys and column keys are ordered by their natural ordering or by supplied comparators.

public class
TreeMultimap<K extends @Nullable Object, V extends @Nullable Object>

Implementation of Multimap whose keys and values are ordered by their natural ordering or by supplied comparators.

public class
TreeMultiset<E extends @Nullable Object>

A multiset which maintains the ordering of its elements, according to either their natural order or an explicit Comparator.

public class
TreeRangeMap<K extends Comparable<T>, V>

An implementation of RangeMap based on a TreeMap, supporting all optional operations.

public class
TreeRangeSet<C extends Comparable<?>>

An implementation of RangeSet backed by a TreeMap.

public abstract class
TreeTraverser<T>

Deprecated Use com.google.common.graph.Traverser instead.
Views elements of a type T as nodes in a tree, and provides methods to traverse the trees induced by this traverser.
public abstract class
UnmodifiableIterator<E extends @Nullable Object>

An iterator that does not support remove.

public abstract class
UnmodifiableListIterator<E extends @Nullable Object>

A list iterator that does not support remove, add, or set.

pack-priv class
UnmodifiableSortedMultiset<E extends @Nullable Object>

Implementation of Multisets#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).

pack-priv class
UsingToStringOrdering

An ordering that uses the natural order of the string representation of the values.

Enum Summary

Modifier and TypeEnum and Description
public enum
BoundType

Indicates whether an endpoint of some range is contained in the range itself ("closed") or not ("open").