@ParametersAreNonnullByDefault

Package com.google.common.collect

This package contains generic collection interfaces and implementations, and other utilities for working with collections.

See:
          Description

Interface Summary
BiMap<K,V> A bimap (or "bidirectional map") is a map that preserves the uniqueness of its values as well as that of its keys.
ClassToInstanceMap<B> A map, each entry of which maps a Java raw type to an instance of that type.
Constraint<E> A constraint that an element must satisfy in order to be added to a collection.
Interner<E> Provides equivalent behavior to String.intern() for other immutable types.
ListMultimap<K,V> A Multimap that can hold duplicate key-value pairs and that maintains the insertion ordering of values for a given key.
MapConstraint<K,V> A constraint on the keys and values that may be added to a Map or Multimap.
MapDifference<K,V> An object representing the differences between two maps.
MapDifference.ValueDifference<V> A difference between the mappings from two maps with the same key.
Maps.EntryTransformer<K,V1,V2> A transformation of the value of a key-value pair, using both key and value as inputs.
Multimap<K,V> A collection similar to a Map, but which may associate multiple values with a single key.
Multiset<E> A collection that supports order-independent equality, like Set, but may have duplicate elements.
Multiset.Entry<E> An unmodifiable element-count pair for a multiset.
PeekingIterator<E> An iterator that supports a one-element lookahead while iterating.
RowSortedTable<R,C,V> Interface that extends Table and whose rows are sorted.
SetMultimap<K,V> A Multimap that cannot hold duplicate key-value pairs.
SortedMapDifference<K,V> An object representing the differences between two sorted maps.
SortedMultiset<E> A Multiset which maintains the ordering of its elements, according to either their natural order or an explicit Comparator.
SortedSetMultimap<K,V> A SetMultimap whose set of values for a given key are kept sorted; that is, they comprise a SortedSet.
Table<R,C,V> A collection that associates an ordered pair of keys, called a row key and a column key, with a single value.
Table.Cell<R,C,V> Row key / column key / value triplet corresponding to a mapping in a table.
 

Class Summary
AbstractIterator<T> This class provides a skeletal implementation of the Iterator interface, to make this interface easier to implement for certain types of data sources.
AbstractLinkedIterator<T> Deprecated. This class has been renamed AbstractSequentialIterator.
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.
ArrayListMultimap<K,V> Implementation of Multimap that uses an ArrayList to store the values for a given key.
ArrayListMultimap_CustomFieldSerializer This class implements the GWT serialization of ArrayListMultimap.
ArrayTable<R,C,V> Fixed-size Table implementation backed by a two-dimensional array.
ByFunctionOrdering_CustomFieldSerializer This class implements the GWT serialization of ByFunctionOrdering.
Collections2 Provides static methods for working with Collection instances.
ComparatorOrdering_CustomFieldSerializer This class implements the GWT serialization of ComparatorOrdering.
ComparisonChain A utility for performing a "lazy" chained comparison statement, which performs comparisons only until it finds a nonzero result.
CompoundOrdering_CustomFieldSerializer This class implements the GWT serialization of CompoundOrdering.
ConcurrentHashMultiset<E> A multiset that supports concurrent modifications and that provides atomic versions of most Multiset operations (exceptions where noted).
Constraints Factories and utilities pertaining to the Constraint interface.
ContiguousSet<C extends Comparable> A sorted set of contiguous values in a given DiscreteDomain.
DiscreteDomain<C extends Comparable> A descriptor for a discrete Comparable domain such as all Integers.
DiscreteDomains Factories for common DiscreteDomain instances.
EmptyImmutableList_CustomFieldSerializer This class implements the GWT serialization of EmptyImmutableList.
EmptyImmutableListMultimap_CustomFieldSerializer This class implements the GWT serialization of EmptyImmutableListMultimap.
EmptyImmutableMap_CustomFieldSerializer This class implements the GWT serialization of EmptyImmutableMap.
EmptyImmutableMultiset_CustomFieldSerializer This class implements the GWT serialization of EmptyImmutableMultiset.
EmptyImmutableSet_CustomFieldSerializer This class implements the GWT serialization of EmptyImmutableSet.
EmptyImmutableSetMultimap_CustomFieldSerializer This class implements the GWT serialization of EmptyImmutableSetMultimap.
EmptyImmutableSortedSet_CustomFieldSerializer This class implements the GWT serialization of EmptyImmutableSortedSet.
EnumBiMap<K extends Enum<K>,V extends Enum<V>> A BiMap backed by two EnumMap instances.
EnumHashBiMap<K extends Enum<K>,V> A BiMap backed by an EnumMap instance for keys-to-values, and a HashMap instance for values-to-keys.
EnumMultiset<E extends Enum<E>> Multiset implementation backed by an EnumMap.
ExplicitOrdering_CustomFieldSerializer This class implements the GWT serialization of ExplicitOrdering.
FluentIterable<E> FluentIterable provides a rich interface for manipulating Iterables in a chained fashion.
ForwardingCollection<E> A collection which forwards all its method calls to another collection.
ForwardingConcurrentMap<K,V> A concurrent map which forwards all its method calls to another concurrent map.
ForwardingDeque<E> A deque which forwards all its method calls to another deque.
ForwardingIterator<T> An iterator which forwards all its method calls to another iterator.
ForwardingList<E> A list which forwards all its method calls to another list.
ForwardingListIterator<E> A list iterator which forwards all its method calls to another list iterator.
ForwardingListMultimap<K,V> A list multimap which forwards all its method calls to another list multimap.
ForwardingMap<K,V> A map which forwards all its method calls to another map.
ForwardingMapEntry<K,V> A map entry which forwards all its method calls to another map entry.
ForwardingMultimap<K,V> A multimap which forwards all its method calls to another multimap.
ForwardingMultiset<E> A multiset which forwards all its method calls to another multiset.
ForwardingNavigableMap<K,V> A navigable map which forwards all its method calls to another navigable map.
ForwardingNavigableSet<E> A navigable set which forwards all its method calls to another navigable set.
ForwardingObject An abstract base class for implementing the decorator pattern.
ForwardingQueue<E> A queue which forwards all its method calls to another queue.
ForwardingSet<E> A set which forwards all its method calls to another set.
ForwardingSetMultimap<K,V> A set multimap which forwards all its method calls to another set multimap.
ForwardingSortedMap<K,V> A sorted map which forwards all its method calls to another sorted map.
ForwardingSortedSet<E> A sorted set which forwards all its method calls to another sorted set.
ForwardingSortedSetMultimap<K,V> A sorted set multimap which forwards all its method calls to another sorted set multimap.
ForwardingTable<R,C,V> A table which forwards all its method calls to another table.
GenericMapMaker<K0,V0> A class exactly like MapMaker, except restricted in the types of maps it can build.
HashBasedTable<R,C,V> Implementation of Table using hash tables.
HashBasedTable_CustomFieldSerializer This class implements the GWT serialization of HashBasedTable.
HashBiMap<K,V> A BiMap backed by two HashMap instances.
HashMultimap<K,V> Implementation of Multimap using hash tables.
HashMultimap_CustomFieldSerializer This class implements the GWT serialization of HashMultimap.
HashMultiset<E> Multiset implementation backed by a HashMap.
HashMultiset_CustomFieldSerializer This class implements the GWT serialization of HashMultiset.
ImmutableAsList_CustomFieldSerializer This class implements the server-side GWT serialization of ImmutableAsList.
ImmutableBiMap<K,V> An immutable BiMap with reliable user-specified iteration order.
ImmutableBiMap.Builder<K,V> A builder for creating immutable bimap instances, especially public static final bimaps ("constant bimaps").
ImmutableClassToInstanceMap<B> A class-to-instance map backed by an ImmutableMap.
ImmutableClassToInstanceMap.Builder<B> A builder for creating immutable class-to-instance maps.
ImmutableCollection<E> An immutable collection.
ImmutableCollection.Builder<E> Abstract base class for builders of ImmutableCollection types.
ImmutableEntry_CustomFieldSerializer This class implements the GWT serialization of ImmutableEntry.
ImmutableEnumSet_CustomFieldSerializer This class implements the GWT serialization of ImmutableEnumSet.
ImmutableList<E> A high-performance, immutable, random-access List implementation.
ImmutableList_CustomFieldSerializer Even though ImmutableList cannot be instantiated, we still need a custom field serializer to unify the type signature of ImmutableList[] on server and client side.
ImmutableList.Builder<E> A builder for creating immutable list instances, especially public static final lists ("constant lists").
ImmutableListMultimap<K,V> An immutable ListMultimap with reliable user-specified key and value iteration order.
ImmutableListMultimap_CustomFieldSerializer This class implements the GWT serialization of ImmutableListMultimap.
ImmutableListMultimap.Builder<K,V> A builder for creating immutable ListMultimap instances, especially public static final multimaps ("constant multimaps").
ImmutableMap<K,V> An immutable, hash-based Map with reliable user-specified iteration order.
ImmutableMap.Builder<K,V> A builder for creating immutable map instances, especially public static final maps ("constant maps").
ImmutableMultimap<K,V> An immutable Multimap.
ImmutableMultimap.Builder<K,V> A builder for creating immutable multimap instances, especially public static final multimaps ("constant multimaps").
ImmutableMultiset<E> An immutable hash-based multiset.
ImmutableMultiset_CustomFieldSerializer Even though ImmutableMultiset cannot be instantiated, we still need a custom field serializer to unify the type signature of ImmutableMultiset[] on server and client side.
ImmutableMultiset.Builder<E> A builder for creating immutable multiset instances, especially public static final multisets ("constant multisets").
ImmutableSet<E> A high-performance, immutable Set with reliable, user-specified iteration order.
ImmutableSet_CustomFieldSerializer Even though ImmutableSet cannot be instantiated, we still need a custom field serializer to unify the type signature of ImmutableSet[] on server and client side.
ImmutableSet.Builder<E> A builder for creating immutable set instances, especially public static final sets ("constant sets").
ImmutableSetMultimap<K,V> An immutable SetMultimap with reliable user-specified key and value iteration order.
ImmutableSetMultimap_CustomFieldSerializer This class implements the GWT serialization of ImmutableSetMultimap.
ImmutableSetMultimap.Builder<K,V> A builder for creating immutable SetMultimap instances, especially public static final multimaps ("constant multimaps").
ImmutableSortedMap<K,V> An immutable SortedMap.
ImmutableSortedMap_CustomFieldSerializer This class implements the GWT serialization of ImmutableSortedMap.
ImmutableSortedMap.Builder<K,V> A builder for creating immutable sorted map instances, especially public static final maps ("constant maps").
ImmutableSortedMultiset<E> An immutable SortedMultiset that stores its elements in a sorted array.
ImmutableSortedMultiset.Builder<E> A builder for creating immutable multiset instances, especially public static final multisets ("constant multisets").
ImmutableSortedSet<E> An immutable SortedSet that stores its elements in a sorted array.
ImmutableSortedSet_CustomFieldSerializer Even though ImmutableSortedSet cannot be instantiated, we still need a custom field serializer to unify the type signature of ImmutableSortedSet[] on server and client side.
ImmutableSortedSet.Builder<E> A builder for creating immutable sorted set instances, especially public static final sets ("constant sets"), with a given comparator.
ImmutableTable<R,C,V> An immutable Table with reliable user-specified iteration order.
ImmutableTable.Builder<R,C,V> A builder for creating immutable table instances, especially public static final tables ("constant tables").
Interners Contains static methods pertaining to instances of Interner.
Iterables This class contains static utility methods that operate on or return objects of type Iterable.
Iterators This class contains static utility methods that operate on or return objects of type Iterator.
LexicographicalOrdering_CustomFieldSerializer This class implements the GWT serialization of LexicographicalOrdering.
LinkedHashMultimap<K,V> 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.
LinkedHashMultimap_CustomFieldSerializer This class implements the GWT serialization of LinkedHashMultimap.
LinkedHashMultiset<E> A Multiset implementation with predictable iteration order.
LinkedHashMultiset_CustomFieldSerializer This class implements the GWT serialization of LinkedHashMultiset.
LinkedListMultimap<K,V> An implementation of ListMultimap that supports deterministic iteration order for both keys and values.
LinkedListMultimap_CustomFieldSerializer This class implements the GWT serialization of LinkedListMultimap.
Lists Static utility methods pertaining to List instances.
MapConstraints Factory and utilities pertaining to the MapConstraint interface.
MapMaker A builder of ConcurrentMap instances having any combination of the following features: keys or values automatically wrapped in weak or soft references least-recently-used eviction when a maximum size is exceeded time-based expiration of entries, measured since last access or last write notification of evicted (or otherwise removed) entries on-demand computation of values for keys not already present
Maps Static utility methods pertaining to Map instances (including instances of SortedMap, BiMap, etc.).
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.
MinMaxPriorityQueue.Builder<B> The builder class used in creation of min-max priority queues.
Multimap_CustomFieldSerializerBase This class contains static utility methods for writing Multimap GWT field serializers.
Multimaps Provides static methods acting on or generating a Multimap.
Multisets Provides static utility methods for creating and working with Multiset instances.
MutableClassToInstanceMap<B> A mutable class-to-instance map backed by an arbitrary user-provided map.
NaturalOrdering_CustomFieldSerializer This class implements the GWT serialization of NaturalOrdering.
NullsFirstOrdering_CustomFieldSerializer This class implements the GWT serialization of NullsFirstOrdering.
NullsLastOrdering_CustomFieldSerializer This class implements the GWT serialization of NullsLastOrdering.
ObjectArrays Static utility methods pertaining to object arrays.
Ordering<T> A comparator with added methods to support common functions.
Queues Static utility methods pertaining to Queue and Deque instances.
Range<C extends Comparable> 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 unless an appropriate DiscreteDomain can be provided to the asSet method.
Ranges Static methods pertaining to Range instances.
RegularImmutableBiMap_CustomFieldSerializer This class implements the GWT serialization of RegularImmutableBiMap.
RegularImmutableList_CustomFieldSerializer This class implements the GWT serialization of RegularImmutableList.
RegularImmutableMap_CustomFieldSerializer This class implements the GWT serialization of RegularImmutableMap.
RegularImmutableMultiset_CustomFieldSerializer This class implements the GWT serialization of RegularImmutableMultiset.
RegularImmutableSet_CustomFieldSerializer This class implements the GWT serialization of RegularImmutableSet.
RegularImmutableSortedSet_CustomFieldSerializer This class implements the GWT serialization of RegularImmutableSortedSet.
ReverseNaturalOrdering_CustomFieldSerializer This class implements the GWT serialization of ReverseNaturalOrdering.
ReverseOrdering_CustomFieldSerializer This class implements the GWT serialization of ReverseOrdering.
Sets Static utility methods pertaining to Set instances.
Sets.SetView<E> An unmodifiable view of a set which may be backed by other sets; this view will change as the backing sets do.
SingletonImmutableList_CustomFieldSerializer This class implements the GWT serialization of SingletonImmutableList.
SingletonImmutableMap_CustomFieldSerializer This class implements the GWT serialization of SingletonImmutableMap.
SingletonImmutableSet_CustomFieldSerializer This class implements the GWT serialization of SingletonImmutableSet.
Tables Provides static methods that involve a Table.
TreeBasedTable<R,C,V> Implementation of Table whose row keys and column keys are ordered by their natural ordering or by supplied comparators.
TreeBasedTable_CustomFieldSerializer This class implements the GWT serialization of TreeBasedTable.
TreeMultimap<K,V> Implementation of Multimap whose keys and values are ordered by their natural ordering or by supplied comparators.
TreeMultimap_CustomFieldSerializer This class implements the GWT serialization of TreeMultimap.
TreeMultiset<E> A multiset which maintains the ordering of its elements, according to either their natural order or an explicit Comparator.
UnmodifiableIterator<E> An iterator that does not support UnmodifiableIterator.remove().
UnmodifiableListIterator<E> A list iterator that does not support UnmodifiableIterator.remove(), UnmodifiableListIterator.add(E), or UnmodifiableListIterator.set(E).
UsingToStringOrdering_CustomFieldSerializer This class implements the GWT serialization of UsingToStringOrdering.
 

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

Exception Summary
AsynchronousComputationException Deprecated. this class is unused by com.google.common.collect.
ComputationException Wraps an exception that occurred during a computation.
 

Package com.google.common.collect Description

This package contains generic collection interfaces and implementations, and other utilities for working with collections. It is a part of the open-source Guava libraries.

Collection Types

BiMap
An extension of Map that guarantees the uniqueness of its values as well as that of its keys. This is sometimes called an "invertible map," since the restriction on values enables it to support an inverse view -- which is another instance of BiMap.
Multiset
An extension of Collection that may contain duplicate values like a List, yet has order-independent equality like a Set. One typical use for a multiset is to represent a histogram.
Multimap
A new type, which is similar to 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 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 Set contract.
SortedSetMultimap
An extension of SetMultimap for which the collection values associated with a given key is a SortedSet.
Table
A new type, which is similar to Map, but which indexes its values by an ordered pair of keys, a row key and column key.
ClassToInstanceMap
An extension of Map that associates a raw type with an instance of that type.

Collection Implementations

of List

of Set

of Map

of BiMap

of Multiset

of Multimap

of Table

of ClassToInstanceMap

Classes of static utility methods

Comparison

Abstract implementations

Ranges

Other

Forwarding collections



Copyright © 2010-2014. All Rights Reserved.