Uses of Interface
com.google.common.collect.Multiset
Packages that use Multiset
Package
Description
Collection interfaces and implementations, and other utilities for collections.
An API for representing graph (node and edge) data.
Testing utilities.
Concurrency utilities.
-
Uses of Multiset in com.google.common.collect
Subinterfaces of Multiset in com.google.common.collectModifier and TypeInterfaceDescriptioninterface
AMultiset
which maintains the ordering of its elements, according to either their natural order or an explicitComparator
.(package private) interface
Superinterface ofSortedMultiset
to introduce a bridge method forelementSet()
, to ensure binary compatibility with older Guava versions that specifiedelementSet()
to returnSortedSet
.Classes in com.google.common.collect that implement MultisetModifier and TypeClassDescription(package private) class
Basic implementation ofMultiset<E>
backed by an instance ofMap<E, Count>
.(package private) class
This class provides a skeletal implementation of theMultiset
interface.(package private) class
This class provides a skeletal implementation of theSortedMultiset
interface.final class
A multiset that supports concurrent modifications and that provides atomic versions of mostMultiset
operations (exceptions where noted).(package private) final class
A descending wrapper around anImmutableSortedMultiset
(package private) class
A skeleton implementation of a descending multiset.final class
EnumMultiset<E extends Enum<E>>
Multiset implementation specialized for enum elements, supporting all single-element operations in O(1).(package private) class
class
A multiset which forwards all its method calls to another multiset.class
A sorted multiset which forwards all its method calls to another sorted multiset.protected class
A skeleton implementation of a descending multiset view.final class
HashMultiset<E>
Multiset implementation backed by aHashMap
.(package private) class
class
AMultiset
whose contents will never change, with many other important properties detailed atImmutableCollection
.class
ASortedMultiset
whose contents will never change, with many other important properties detailed atImmutableCollection
.(package private) final class
An implementation of ImmutableMultiset backed by a JDK Map and a list of entries.final class
AMultiset
implementation with predictable iteration order.(package private) static class
Multimaps.Keys<K,
V> private static final class
(package private) static class
private static class
AnAbstractMultiset
with additional default implementations, some of them linear-time implementations in terms ofelementSet
andentrySet
.(package private) class
Implementation ofImmutableMultiset
with zero or more elements.(package private) final class
An immutable sorted multiset with one or more distinct elements.(package private) static final class
final class
TreeMultiset<E>
A multiset which maintains the ordering of its elements, according to either their natural order or an explicitComparator
.(package private) final class
Implementation ofMultisets.unmodifiableSortedMultiset(SortedMultiset)
, split out into its own file so it can be GWT emulated (to deal with the differing elementSet() types in GWT and non-GWT).Fields in com.google.common.collect declared as MultisetModifier and TypeFieldDescriptionImmutableMultiset.Builder.contents
ImmutableMultiset.ElementSet.delegate
Multisets.UnmodifiableMultiset.delegate
AbstractMultimap.keys
Multimaps.UnmodifiableMultimap.keys
Synchronized.SynchronizedMultimap.keys
Multisets.MultisetIteratorImpl.multiset
Multisets.FilteredMultiset.unfiltered
Methods in com.google.common.collect with type parameters of type MultisetModifier and TypeMethodDescriptionCollectCollectors.toMultiset
(Function<? super T, E> elementFunction, ToIntFunction<? super T> countFunction, Supplier<M> multisetSupplier) Multisets.toMultiset
(Function<? super T, E> elementFunction, ToIntFunction<? super T> countFunction, Supplier<M> multisetSupplier) Returns aCollector
that accumulates elements into a multiset created via the specifiedSupplier
, whose elements are the result of applyingelementFunction
to the inputs, with counts equal to the result of applyingcountFunction
to the inputs.Methods in com.google.common.collect that return MultisetModifier and TypeMethodDescription(package private) static <T> Multiset
<T> Used to avoid http://bugs.sun.com/view_bug.do?bug_id=6558557AbstractMapBasedMultimap.createKeys()
AbstractMultimap.createKeys()
FilteredEntryMultimap.createKeys()
FilteredKeyMultimap.createKeys()
LinkedListMultimap.createKeys()
Multimaps.MapMultimap.createKeys()
Multimaps.TransformedEntriesMultimap.createKeys()
DescendingMultiset.delegate()
ForwardingMultiset.delegate()
Multisets.UnmodifiableMultiset.delegate()
Synchronized.SynchronizedMultiset.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> Returns a view of the elements ofunfiltered
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.AbstractMultimap.keys()
ForwardingMultimap.keys()
Multimap.keys()
Returns a view collection containing the key from each key-value pair in this multimap, without collapsing duplicates.Multimaps.UnmodifiableMultimap.keys()
Synchronized.SynchronizedMultimap.keys()
AbstractMultiset.ElementSet.multiset()
AbstractMultiset.EntrySet.multiset()
ForwardingMultiset.StandardElementSet.multiset()
Multisets.ElementSet.multiset()
Multisets.EntrySet.multiset()
(package private) static <E> Multiset
<E> static <E> Multiset
<E> Returns an unmodifiable view of the sum of two multisets.static <E> Multiset
<E> Returns an unmodifiable view of the union of two multisets.static <E> Multiset
<E> Multisets.unmodifiableMultiset
(ImmutableMultiset<E> multiset) Deprecated.no need to use thisstatic <E> Multiset
<E> Multisets.unmodifiableMultiset
(Multiset<? extends E> multiset) Returns an unmodifiable view of the specified multiset.Methods in com.google.common.collect with parameters of type MultisetModifier and TypeMethodDescriptionprivate static <E> boolean
Multisets.addAllImpl
(Multiset<E> self, Multiset<? extends E> elements) A specialization ofaddAllImpl
for whenelements
is itself a Multiset.(package private) static <E> boolean
Multisets.addAllImpl
(Multiset<E> self, Collection<? extends E> elements) An implementation ofCollection.addAll(java.util.Collection<? extends E>)
.static boolean
Multisets.containsOccurrences
(Multiset<?> superMultiset, Multiset<?> subMultiset) Returnstrue
ifsubMultiset.count(o) <= superMultiset.count(o)
for allo
.static <E> ImmutableMultiset
<E> Multisets.copyHighestCountFirst
(Multiset<E> multiset) Returns a copy ofmultiset
as anImmutableMultiset
whose iteration order puts the 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.(package private) static boolean
Multisets.equalsImpl
(Multiset<?> multiset, Object object) An implementation ofequals(java.lang.Object)
.static <E> Multiset
<E> Returns a view of the elements ofunfiltered
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.(package private) static <E> Iterator
<E> Multisets.iteratorImpl
(Multiset<E> multiset) An implementation ofiterator()
.(package private) static int
Multisets.linearTimeSizeImpl
(Multiset<?> multiset) An implementation ofsize()
.(package private) static <E> Multiset
<E> (package private) static <E> void
Serialization.populateMultiset
(Multiset<E> multiset, ObjectInputStream stream) Populates a multiset by reading an input stream, as part of deserialization.(package private) static <E> void
Serialization.populateMultiset
(Multiset<E> multiset, ObjectInputStream stream, int distinctElements) Populates a multiset by reading an input stream, as part of deserialization.(package private) static boolean
Multisets.removeAllImpl
(Multiset<?> self, Collection<?> elementsToRemove) An implementation ofremoveAll(java.util.Collection<?>)
.static boolean
Multisets.removeOccurrences
(Multiset<?> multisetToModify, Multiset<?> occurrencesToRemove) For each occurrence of an elemente
inoccurrencesToRemove
, removes one occurrence ofe
inmultisetToModify
.static boolean
Multisets.removeOccurrences
(Multiset<?> multisetToModify, Iterable<?> occurrencesToRemove) For each occurrence of an elemente
inoccurrencesToRemove
, removes one occurrence ofe
inmultisetToModify
.(package private) static boolean
Multisets.retainAllImpl
(Multiset<?> self, Collection<?> elementsToRetain) An implementation ofretainAll(java.util.Collection<?>)
.static boolean
Multisets.retainOccurrences
(Multiset<?> multisetToModify, Multiset<?> multisetToRetain) ModifiesmultisetToModify
so that its count for an elemente
is at mostmultisetToRetain.count(e)
.private static <E> boolean
Multisets.retainOccurrencesImpl
(Multiset<E> multisetToModify, Multiset<?> occurrencesToRetain) Delegate implementation which cares about the element type.(package private) static <E> int
Multisets.setCountImpl
(Multiset<E> self, E element, int count) An implementation ofsetCount(Object, int)
.(package private) static <E> boolean
Multisets.setCountImpl
(Multiset<E> self, E element, int oldCount, int newCount) An implementation ofsetCount(Object, int, int)
.(package private) static <E> Spliterator
<E> Multisets.spliteratorImpl
(Multiset<E> multiset) static <E> Multiset
<E> Returns an unmodifiable view of the sum of two multisets.static <E> Multiset
<E> 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.(package private) static <E> void
Serialization.writeMultiset
(Multiset<E> multiset, ObjectOutputStream stream) Stores the contents of a multiset in an output stream, as part of serialization.Constructors in com.google.common.collect with parameters of type MultisetModifierConstructorDescription(package private)
(package private)
ElementSet
(List<Multiset.Entry<E>> entries, Multiset<E> delegate) (package private)
FilteredMultiset
(Multiset<E> unfiltered, Predicate<? super E> predicate) (package private)
MultisetIteratorImpl
(Multiset<E> multiset, Iterator<Multiset.Entry<E>> entryIterator) (package private)
SerializedForm
(Multiset<? extends Object> multiset) (package private)
SynchronizedMultiset
(Multiset<E> delegate, Object mutex) (package private)
UnmodifiableMultiset
(Multiset<? extends E> delegate) -
Uses of Multiset in com.google.common.collect.testing.google
Methods in com.google.common.collect.testing.google that return MultisetMethods in com.google.common.collect.testing.google that return types with arguments of type MultisetMethods in com.google.common.collect.testing.google with parameters of type MultisetModifier and TypeMethodDescriptionstatic <E> void
UnmodifiableCollectionTests.assertMultisetIsUnmodifiable
(Multiset<E> multiset, E sampleElement) Verifies that a multiset is immutable.(package private) static <T> SortedMultiset
<T> Used to avoid http://bugs.sun.com/view_bug.do?bug_id=6558557 -
Uses of Multiset in com.google.common.graph
Fields in com.google.common.graph with type parameters of type MultisetModifier and TypeFieldDescriptionUndirectedMultiNetworkConnections.adjacentNodesReference
DirectedMultiNetworkConnections.predecessorsReference
DirectedMultiNetworkConnections.successorsReference
Methods in com.google.common.graph that return MultisetModifier and TypeMethodDescriptionUndirectedMultiNetworkConnections.adjacentNodesMultiset()
DirectedMultiNetworkConnections.predecessorsMultiset()
DirectedMultiNetworkConnections.successorsMultiset()
-
Uses of Multiset in com.google.common.testing
Methods in com.google.common.testing that return MultisetModifier and TypeMethodDescription(package private) static <E> Multiset
<E> FreshValueGenerator.generateMultiset
(E freshElement) -
Uses of Multiset in com.google.common.util.concurrent
Fields in com.google.common.util.concurrent declared as MultisetModifier and TypeFieldDescription(package private) final Multiset
<Service.State> ServiceManager.ServiceManagerState.states