@ParametersAreNonnullByDefault

Package com.google.common.collect

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

See: Description

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.
ClassToInstanceMap
An extension of Map that associates a raw type with an instance of that type.

Collection Implementations

of List

ImmutableList

of Set

ImmutableSet
ImmutableSortedSet

of Map

ImmutableMap
ImmutableSortedMap
MapMaker

of BiMap

ImmutableBiMap
HashBiMap
EnumBiMap
EnumHashBiMap

of Multiset

ImmutableMultiset
HashMultiset
LinkedHashMultiset
TreeMultiset
EnumMultiset
ConcurrentHashMultiset

of Multimap

ImmutableMultimap
ImmutableListMultimap
ImmutableSetMultimap
ArrayListMultimap
HashMultimap
TreeMultimap
LinkedHashMultimap
LinkedListMultimap

of ClassToInstanceMap

ImmutableClassToInstanceMap
MutableClassToInstanceMap

Classes of static utility methods

Collections2
Iterators
Iterables
Lists
Maps
Sets
Multisets
Multimaps
ObjectArrays

Comparison

Ordering
ComparisonChain

Abstract implementations

AbstractIterator
ImmutableCollection
UnmodifiableIterator

Other

Interner, Interners
Constraint, Constraints
MapConstraint, MapConstraints
MapDifference
PeekingIterator

Forwarding collections

ForwardingCollection
ForwardingConcurrentMap
ForwardingIterator
ForwardingList
ForwardingListIterator
ForwardingListMultimap
ForwardingMap
ForwardingMapEntry
ForwardingMultimap
ForwardingMultiset
ForwardingObject
ForwardingQueue
ForwardingSet
ForwardingSetMultimap
ForwardingSortedMap
ForwardingSortedSet
ForwardingSortedSetMultimap

Copyright © 2010-2012. All Rights Reserved.