Package com.google.common.collect
Class ForwardingMultiset.StandardElementSet
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractSet<E>
-
- com.google.common.collect.ForwardingMultiset.StandardElementSet
-
- All Implemented Interfaces:
Iterable<E>,Collection<E>,Set<E>
- Enclosing class:
- ForwardingMultiset<E extends @Nullable Object>
protected class ForwardingMultiset.StandardElementSet extends AbstractSet<E>
A sensible implementation ofMultiset.elementSet()in terms of the following methods:ForwardingCollection.clear(),ForwardingCollection.contains(java.lang.Object),ForwardingCollection.containsAll(java.util.Collection<?>),ForwardingMultiset.count(java.lang.Object),ForwardingCollection.isEmpty(), theSet.size()andSet.iterator()methods ofForwardingMultiset.entrySet(), andForwardingMultiset.remove(Object, int). In many situations, you may wish to overrideForwardingMultiset.elementSet()to forward to this implementation or a subclass thereof.- Since:
- 10.0
-
-
Constructor Summary
Constructors Constructor Description StandardElementSet()Constructor for use by subclasses.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()booleancontains(Object o)booleancontainsAll(Collection<?> c)booleanisEmpty()Iterator<E>iterator()booleanremove(Object o)booleanremoveAll(Collection<?> c)booleanretainAll(Collection<?> c)intsize()-
Methods inherited from class java.util.AbstractSet
equals, hashCode
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
-
-
-
Constructor Detail
-
StandardElementSet
public StandardElementSet()
Constructor for use by subclasses.
-
-
Method Detail
-
clear
public void clear()
-
contains
public boolean contains(@CheckForNull Object o)
-
containsAll
public boolean containsAll(Collection<?> c)
- Specified by:
containsAllin interfaceCollection<E extends @Nullable Object>- Specified by:
containsAllin interfaceSet<E extends @Nullable Object>- Overrides:
containsAllin classAbstractCollection<E extends @Nullable Object>
-
isEmpty
public boolean isEmpty()
-
remove
public boolean remove(@CheckForNull Object o)
-
size
public int size()
-
removeAll
public boolean removeAll(Collection<?> c)
-
retainAll
public boolean retainAll(Collection<?> c)
-
-