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.google.common.collect.SortedMultisetBridge<E>
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<E>>
Multiset implementation specialized for enum elements, supporting all single-element operations
in O(1).
|
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.StandardDescendingMultiset
A skeleton implementation of a descending multiset view.
|
class |
HashMultiset<E>
Multiset implementation that uses hashing for key and entry access.
|
class |
ImmutableMultiset<E>
A
Multiset whose contents will never change, with many other important properties
detailed at ImmutableCollection . |
class |
ImmutableSortedMultiset<E>
A
SortedMultiset whose contents will never change, with many other important properties
detailed at ImmutableCollection . |
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<E> |
ForwardingMultiset.delegate() |
static <E> Multiset<E> |
Multisets.difference(Multiset<E> multiset1,
Multiset<?> multiset2)
Returns an unmodifiable view of the difference of two multisets.
|
static <E> Multiset<E> |
Multisets.filter(Multiset<E> unfiltered,
Predicate<? super E> predicate)
Returns a view of the elements of
unfiltered that satisfy a predicate. |
static <E> Multiset<E> |
Multisets.intersection(Multiset<E> multiset1,
Multiset<?> multiset2)
Returns an unmodifiable view of the intersection of two multisets.
|
Multiset<K> |
Multimap.keys()
Returns a view collection containing the key from each key-value pair in this multimap,
without collapsing duplicates.
|
Multiset<K> |
ForwardingMultimap.keys() |
static <E> Multiset<E> |
Multisets.sum(Multiset<? extends E> multiset1,
Multiset<? extends E> multiset2)
Returns an unmodifiable view of the sum of two multisets.
|
static <E> Multiset<E> |
Multisets.union(Multiset<? extends E> multiset1,
Multiset<? extends E> multiset2)
Returns an unmodifiable view of the union of two multisets.
|
static <E> Multiset<E> |
Multisets.unmodifiableMultiset(ImmutableMultiset<E> multiset)
Deprecated.
no need to use this
|
static <E> Multiset<E> |
Multisets.unmodifiableMultiset(Multiset<? extends E> multiset)
Returns an unmodifiable view of the specified multiset.
|
Modifier and Type | Method and Description |
---|---|
static boolean |
Multisets.containsOccurrences(Multiset<?> superMultiset,
Multiset<?> subMultiset)
Returns
true if subMultiset.count(o) <= superMultiset.count(o) for all o . |
static boolean |
Multisets.containsOccurrences(Multiset<?> superMultiset,
Multiset<?> subMultiset)
Returns
true if subMultiset.count(o) <= superMultiset.count(o) for all o . |
static <E> ImmutableMultiset<E> |
Multisets.copyHighestCountFirst(Multiset<E> 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<E> |
Multisets.difference(Multiset<E> multiset1,
Multiset<?> multiset2)
Returns an unmodifiable view of the difference of two multisets.
|
static <E> Multiset<E> |
Multisets.difference(Multiset<E> multiset1,
Multiset<?> multiset2)
Returns an unmodifiable view of the difference of two multisets.
|
static <E> Multiset<E> |
Multisets.filter(Multiset<E> unfiltered,
Predicate<? super E> predicate)
Returns a view of the elements of
unfiltered that satisfy a predicate. |
static <E> Multiset<E> |
Multisets.intersection(Multiset<E> multiset1,
Multiset<?> multiset2)
Returns an unmodifiable view of the intersection of two multisets.
|
static <E> Multiset<E> |
Multisets.intersection(Multiset<E> multiset1,
Multiset<?> multiset2)
Returns an unmodifiable view of the intersection of two multisets.
|
static boolean |
Multisets.removeOccurrences(Multiset<?> multisetToModify,
Iterable<?> occurrencesToRemove)
For each occurrence of an element
e in occurrencesToRemove , removes one
occurrence of e in multisetToModify . |
static boolean |
Multisets.removeOccurrences(Multiset<?> multisetToModify,
Multiset<?> occurrencesToRemove)
For each occurrence of an element
e in occurrencesToRemove , removes one
occurrence of e in multisetToModify . |
static boolean |
Multisets.removeOccurrences(Multiset<?> multisetToModify,
Multiset<?> occurrencesToRemove)
For each occurrence of an element
e in occurrencesToRemove , removes one
occurrence of e in multisetToModify . |
static boolean |
Multisets.retainOccurrences(Multiset<?> multisetToModify,
Multiset<?> multisetToRetain)
Modifies
multisetToModify so that its count for an element e is at most multisetToRetain.count(e) . |
static boolean |
Multisets.retainOccurrences(Multiset<?> multisetToModify,
Multiset<?> multisetToRetain)
Modifies
multisetToModify so that its count for an element e is at most multisetToRetain.count(e) . |
static <E> Multiset<E> |
Multisets.sum(Multiset<? extends E> multiset1,
Multiset<? extends E> multiset2)
Returns an unmodifiable view of the sum of two multisets.
|
static <E> Multiset<E> |
Multisets.sum(Multiset<? extends E> multiset1,
Multiset<? extends E> multiset2)
Returns an unmodifiable view of the sum of two multisets.
|
static <E> Multiset<E> |
Multisets.union(Multiset<? extends E> multiset1,
Multiset<? extends E> multiset2)
Returns an unmodifiable view of the union of two multisets.
|
static <E> Multiset<E> |
Multisets.union(Multiset<? extends E> multiset1,
Multiset<? extends E> multiset2)
Returns an unmodifiable view of the union of two multisets.
|
static <E> Multiset<E> |
Multisets.unmodifiableMultiset(Multiset<? extends E> multiset)
Returns an unmodifiable view of the specified multiset.
|
Copyright © 2010–2020. All rights reserved.