| Package | Description |
|---|---|
| com.google.common.collect |
This package contains generic collection interfaces and implementations, and other utilities for working with collections.
|
| Modifier and Type | Interface and Description |
|---|---|
interface |
SortedMultiset<E>
A
Multiset which maintains the ordering of its elements, according to either their natural order or an explicit
Comparator.
|
(package private) interface |
com
Superinterface of
SortedMultiset to introduce a bridge method for
elementSet(), to ensure binary compatibility with older Guava versions that specified
elementSet() to return
SortedSet.
|
| Modifier and Type | Class and Description |
|---|---|
class |
ConcurrentHashMultiset<E>
A multiset that supports concurrent modifications and that provides atomic versions of most
Multiset operations (exceptions where noted).
|
class |
EnumMultiset<E extends Enum
Multiset implementation backed by an
EnumMap.
|
class |
ForwardingMultiset<E>
A multiset which forwards all its method calls to another multiset.
|
class |
ForwardingSortedMultiset<E>
A sorted multiset which forwards all its method calls to another sorted multiset.
|
protected class |
ForwardingSortedMultiset
A skeleton implementation of a descending multiset view.
|
class |
HashMultiset<E>
Multiset implementation backed by a
HashMap.
|
class |
ImmutableMultiset<E>
An immutable hash-based multiset.
|
class |
ImmutableSortedMultiset<E>
An immutable
SortedMultiset that stores its elements in a sorted array.
|
class |
LinkedHashMultiset<E>
A
Multiset implementation with predictable iteration order.
|
class |
TreeMultiset<E>
A multiset which maintains the ordering of its elements, according to either their natural order or an explicit
Comparator.
|
| Modifier and Type | Method and Description |
|---|---|
protected abstract Multiset |
ForwardingMultiset.delegate()
|
static <E> Multiset |
Multisets.difference(Multiset
Returns an unmodifiable view of the difference of two multisets.
|
static <E> Multiset |
Multisets.filter(Multiset
Returns a view of the elements of
unfiltered that satisfy a predicate.
|
static <E> Multiset |
Multisets.intersection(Multiset
Returns an unmodifiable view of the intersection of two multisets.
|
Multiset |
ForwardingMultimap.keys()
|
Multiset |
Multimap.keys()
Returns a view collection containing the key from each key-value pair in this multimap,
without collapsing duplicates.
|
static <E> Multiset |
Multisets.sum(Multiset
Returns an unmodifiable view of the sum of two multisets.
|
static <E> Multiset |
Multisets.union(Multiset
Returns an unmodifiable view of the union of two multisets.
|
static <E> Multiset |
Multisets.unmodifiableMultiset(ImmutableMultiset
Deprecated.
no need to use this
|
static <E> Multiset |
Multisets.unmodifiableMultiset(Multiset
Returns an unmodifiable view of the specified multiset.
|
| Modifier and Type | Method and Description |
|---|---|
static boolean |
Multisets.containsOccurrences(Multiset
Returns
true if
subMultiset.count(o) <= superMultiset.count(o) for all
o.
|
static boolean |
Multisets.containsOccurrences(Multiset
Returns
true if
subMultiset.count(o) <= superMultiset.count(o) for all
o.
|
static <E> ImmutableMultiset |
Multisets.copyHighestCountFirst(Multiset
Returns a copy of
multiset as an
ImmutableMultiset whose iteration order is highest count first, with ties broken by the iteration order of the original multiset.
|
static <E> Multiset |
Multisets.difference(Multiset
Returns an unmodifiable view of the difference of two multisets.
|
static <E> Multiset |
Multisets.difference(Multiset
Returns an unmodifiable view of the difference of two multisets.
|
static <E> Multiset |
Multisets.filter(Multiset
Returns a view of the elements of
unfiltered that satisfy a predicate.
|
static <E> Multiset |
Multisets.intersection(Multiset
Returns an unmodifiable view of the intersection of two multisets.
|
static <E> Multiset |
Multisets.intersection(Multiset
Returns an unmodifiable view of the intersection of two multisets.
|
static boolean |
Multisets.removeOccurrences(Multiset
For each occurrence of an element
e in
occurrencesToRemove, removes one occurrence of
e in
multisetToModify.
|
static boolean |
Multisets.retainOccurrences(Multiset
Modifies
multisetToModify so that its count for an element
e is at most
multisetToRetain.count(e).
|
static boolean |
Multisets.retainOccurrences(Multiset
Modifies
multisetToModify so that its count for an element
e is at most
multisetToRetain.count(e).
|
static <E> Multiset |
Multisets.sum(Multiset
Returns an unmodifiable view of the sum of two multisets.
|
static <E> Multiset |
Multisets.sum(Multiset
Returns an unmodifiable view of the sum of two multisets.
|
static <E> Multiset |
Multisets.union(Multiset
Returns an unmodifiable view of the union of two multisets.
|
static <E> Multiset |
Multisets.union(Multiset
Returns an unmodifiable view of the union of two multisets.
|
static <E> Multiset |
Multisets.unmodifiableMultiset(Multiset
Returns an unmodifiable view of the specified multiset.
|