The classes in this package include:
ImmutableCollection for details). Implementations are available for both
the JDK collection types and the Guava collection types (listed below).
Multimap
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
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
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
SetMultimap for which the collection values associated with a given key is a java.util.SortedSet .
BiMap
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
java.util.Map , but which indexes its values by an
ordered pair of keys, a row key and column key.
Multiset
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
java.util.Map that associates a raw type with an instance of that
type.
Collections2
Comparators
Iterables
Iterators
Lists
Maps
MoreCollectors
Multimaps
Multisets
ObjectArrays
Queues
Sets
Streams
Tables
ForwardingCollection.
| Modifier and Type | Interface and Description |
|---|---|
| public interface | |
| public interface | ClassToInstanceMap<
the common supertype that all values will share. When in doubt, just use B extends @Nullable Object>Object, or use @Nullable Object to allow null values.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 |
| public interface | |
| public interface | ListMultimap<K extends @Nullable Object, V extends @Nullable Object>
A |
| public interface | MapDifference<K extends @Nullable Object, V extends @Nullable Object>
An object representing the differences between two maps. |
| public interface | |
| public interface | |
| public interface | PeekingIterator<E extends @Nullable Object>
An iterator that supports a one-element lookahead while iterating. |
| public interface | |
| public interface | RangeSet<C extends Comparable
A set comprising zero or more nonempty, disconnected ranges of type |
| public interface | |
| public interface | SetMultimap<K extends @Nullable Object, V extends @Nullable Object>
A |
| pack-priv interface | SortedIterable<T extends @Nullable Object>
An |
| 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 |
| pack-priv interface | SortedMultisetBridge<E extends @Nullable Object>
Superinterface of |
| public interface | |
| public interface |
| Modifier and Type | Annotation 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 |
| 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. |
| Modifier and Type | Class and Description |
|---|---|
| pack-priv abstract class | AbstractBiMap<K extends @Nullable Object, V extends @Nullable Object>
A general-purpose bimap implementation using any two backing |
| pack-priv abstract class | AbstractIndexedListIterator<E extends @Nullable Object>
This class provides a skeletal implementation of the |
| public abstract class | AbstractIterator<T extends @Nullable Object>
This class provides a skeletal implementation of the |
| pack-priv abstract class | AbstractListMultimap<K extends @Nullable Object, V extends @Nullable Object>
Basic implementation of the |
| pack-priv abstract class | |
| pack-priv abstract class | AbstractMapBasedMultiset<E extends @Nullable Object>
Basic implementation of |
| pack-priv abstract class | AbstractMapEntry<K extends @Nullable Object, V extends @Nullable Object>
Implementation of the |
| pack-priv abstract class | AbstractMultimap<K extends @Nullable Object, V extends @Nullable Object>
A skeleton |
| pack-priv abstract class | AbstractMultiset<E extends @Nullable Object>
This class provides a skeletal implementation of the |
| pack-priv abstract class | AbstractNavigableMap<K extends @Nullable Object, V extends @Nullable Object>
Skeletal implementation of |
| pack-priv abstract class | |
| public abstract class | AbstractSequentialIterator<T>
This class provides a skeletal implementation of the |
| pack-priv abstract class | AbstractSetMultimap<K extends @Nullable Object, V extends @Nullable Object>
Basic implementation of the |
| pack-priv abstract class | AbstractSortedKeySortedSetMultimap<K extends @Nullable Object, V extends @Nullable Object>
Basic implementation of a |
| pack-priv abstract class | AbstractSortedMultiset<E extends @Nullable Object>
This class provides a skeletal implementation of the |
| pack-priv abstract class | AbstractSortedSetMultimap<K extends @Nullable Object, V extends @Nullable Object>
Basic implementation of the |
| pack-priv abstract class | |
| 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 |
| pack-priv abstract class | ArrayListMultimapGwtSerializationDependencies<K, V>
A dummy superclass to support GWT serialization of the element types of an |
| public class | |
| pack-priv abstract class | BaseImmutableMultimap<K, V>
A dummy superclass of |
| 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 |
| public class | Collections2
Provides static methods for working with |
| pack-priv class | CollectPreconditions
Precondition checks useful in collection implementations. |
| pack-priv class | CollectSpliterators
Spliterator utilities for |
| 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 | |
| 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 | |
| public class | Comparators
Provides static methods for working with |
| public abstract class | ComparisonChain
A utility for performing a chained comparison statement Note Java 8+ users should
generally prefer the methods in |
| pack-priv class | |
| public class | ComputationException
Deprecated
This exception is no longer thrown by Wraps an exception that occurred during a computation.
com.google.common.
|
| public class | ConcurrentHashMultiset<E>
A multiset that supports concurrent modifications and that provides atomic versions of most
|
| 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 | |
| pack-priv class | Count
A mutable value of type |
| pack-priv abstract class | |
| pack-priv class | |
| pack-priv class | |
| pack-priv class | |
| pack-priv abstract class | |
| public abstract class | DiscreteDomain<C extends Comparable
A descriptor for a discrete |
| pack-priv class | |
| pack-priv class | EmptyImmutableListMultimap
Implementation of |
| pack-priv class | EmptyImmutableSetMultimap
Implementation of |
| public class | |
| public class | EnumHashBiMap<K extends Enum
A |
| public class | EnumMultiset<E extends Enum
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 | |
| pack-priv class | FilteredEntryMultimap<K extends @Nullable Object, V extends @Nullable Object>
Implementation of |
| pack-priv class | FilteredEntrySetMultimap<K extends @Nullable Object, V extends @Nullable Object>
Implementation of |
| pack-priv class | FilteredKeyListMultimap<K extends @Nullable Object, V extends @Nullable Object>
Implementation of |
| pack-priv class | FilteredKeyMultimap<K extends @Nullable Object, V extends @Nullable Object>
Implementation of |
| pack-priv class | FilteredKeySetMultimap<K extends @Nullable Object, V extends @Nullable Object>
Implementation of |
| pack-priv class | FilteredMultimapValues<K extends @Nullable Object, V extends @Nullable Object>
Implementation for |
| public abstract class | FluentIterable<E extends @Nullable Object>
A discouraged (but not deprecated) precursor to Java's superior |
| public abstract class | ForwardingBlockingDeque<E>
Deprecated
This class has moved to A com.google.common.util.concurrent.
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 | |
| 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 | |
| pack-priv class | |
| public class | |
| public class | |
| pack-priv class | Hashing
Static methods for implementing hash-based collections. |
| public class | |
| pack-priv abstract class | HashMultimapGwtSerializationDependencies<K, V>
A dummy superclass to support GWT serialization of the element types of a |
| public class | |
| pack-priv abstract class | ImmutableAsList<E>
List returned by |
| public abstract class | ImmutableBiMap<K, V>
A |
| pack-priv abstract class | ImmutableBiMapFauxverideShim<K, V>
"Overrides" the |
| public class | ImmutableClassToInstanceMap<B>
A |
| public abstract class | ImmutableCollection<E>
A |
| pack-priv class | ImmutableEntry<K extends @Nullable Object, V extends @Nullable Object>
An immutable |
| pack-priv class | ImmutableEnumMap<K extends Enum
Implementation of |
| pack-priv class | ImmutableEnumSet<E extends Enum
Implementation of |
| public abstract class | ImmutableList<E>
A |
| public class | ImmutableListMultimap<K, V>
A |
| public abstract class | ImmutableMap<K, V>
A |
| pack-priv class | ImmutableMapEntry<K, V>
Implementation of |
| pack-priv abstract class | |
| pack-priv class | |
| pack-priv class | |
| public abstract class | ImmutableMultimap<K, V>
A |
| public abstract class | ImmutableMultiset<E>
A |
| pack-priv abstract class | ImmutableMultisetGwtSerializationDependencies<E>
A dummy superclass to support GWT serialization of the element type of an |
| public class | ImmutableRangeMap<K extends Comparable
A |
| public class | ImmutableRangeSet<C extends Comparable
A |
| public abstract class | ImmutableSet<E>
A |
| public class | ImmutableSetMultimap<K, V>
A |
| pack-priv class | |
| public class | ImmutableSortedMap<K, V>
A |
| pack-priv abstract class | ImmutableSortedMapFauxverideShim<K, V>
"Overrides" the |
| public abstract class | ImmutableSortedMultiset<E>
A |
| pack-priv abstract class | ImmutableSortedMultisetFauxverideShim<E>
"Overrides" the |
| public abstract class | ImmutableSortedSet<E>
A |
| pack-priv abstract class | ImmutableSortedSetFauxverideShim<E>
"Overrides" the |
| public abstract class | ImmutableTable<R, C, V>
A |
| pack-priv abstract class | |
| public class | |
| public class | Iterables
An assortment of mainly legacy static utility methods that operate on or return objects of type
|
| public class | |
| 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 |
| pack-priv abstract class | LinkedHashMultimapGwtSerializationDependencies<K, V>
A dummy superclass to support GWT serialization of the element types of a |
| public class | LinkedHashMultiset<E extends @Nullable Object>
A |
| public class | LinkedListMultimap<K extends @Nullable Object, V extends @Nullable Object>
An implementation of |
| public class | |
| public class | MapMaker
A builder of |
| 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 E extends MapMakerInternalMap.InternalEntry entry implementation used internallythe type of the S extends MapMakerInternalMap.Segment entry implementation used internallyThe concurrent hash map implementation built by |
| public class | |
| 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 |
| 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 |
| public class | Multimaps
Provides static methods acting on or generating a |
| public class | |
| 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 |
| pack-priv class | NullsLastOrdering<T extends @Nullable Object>
An ordering that treats |
| public class | ObjectArrays
Static utility methods pertaining to object arrays. |
| public abstract class | |
| pack-priv class | Platform
Methods factored out so that they can be emulated differently in GWT. |
| public class | |
| public class | Range<C extends Comparable
A range (or "interval") defines the boundaries around a contiguous span of values of some
|
| pack-priv abstract class | RangeGwtSerializationDependencies<C extends Comparable
A dummy superclass to support GWT serialization of the element type of a |
| pack-priv class | RegularContiguousSet<C extends Comparable
An implementation of |
| pack-priv class | RegularImmutableAsList<E>
An |
| pack-priv class | |
| pack-priv class | |
| pack-priv class | |
| pack-priv class | |
| pack-priv class | |
| pack-priv class | |
| pack-priv class | |
| pack-priv abstract class | RegularImmutableTable<R, C, V>
An implementation of |
| pack-priv class | ReverseNaturalOrdering
An ordering that uses the reverse of the natural order of the values. |
| pack-priv class | |
| pack-priv class | Serialization
Provides static methods for serializing collection classes. |
| public class | |
| pack-priv class | |
| pack-priv class | |
| pack-priv class | |
| pack-priv class | |
| pack-priv class | SortedIterables
Utilities for dealing with sorted collections of all types. |
| pack-priv class | SortedLists
Static methods pertaining to sorted |
| pack-priv class | SortedMultisets
Provides static utility methods for creating and working with |
| pack-priv class | |
| pack-priv class | StandardRowSortedTable<R, C, V>
Implementation of |
| pack-priv class | StandardTable<R, C, V>
|
| public class | Streams
Static utility methods related to |
| pack-priv class | Synchronized
Synchronized collection views. |
| pack-priv class | TableCollectors
Collectors utilities for |
| public class | Tables
Provides static methods that involve a |
| pack-priv class | TopKSelector<T extends @Nullable Object>
An accumulator that selects the "top" |
| 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 |
| public class | TreeMultimap<K extends @Nullable Object, V extends @Nullable Object>
Implementation of |
| 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 |
| public class | TreeRangeMap<K extends Comparable
An implementation of |
| public class | |
| public abstract class | TreeTraverser<T>
Deprecated
Use Views elements of a type com. instead.
T as nodes in a tree, and provides methods to traverse the trees
induced by this traverser.
|
| public abstract class | |
| public abstract class | |
| pack-priv class | UnmodifiableSortedMultiset<E extends @Nullable Object>
Implementation of |
| pack-priv class | UsingToStringOrdering
An ordering that uses the natural order of the string representation of the values. |
| Modifier and Type | Enum and Description |
|---|---|
| public enum | BoundType
Indicates whether an endpoint of some range is contained in the range itself ("closed") or not ("open"). |