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(@Nullable Object o)booleancontainsAll(Collection<?> c)booleanisEmpty()Iterator<E>iterator()booleanremove(@Nullable 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()
- Specified by:
 clearin interfaceCollection<E extends @Nullable Object>- Specified by:
 clearin interfaceSet<E extends @Nullable Object>- Overrides:
 clearin classAbstractCollection<E extends @Nullable Object>
 
- 
contains
public boolean contains(@Nullable Object o)
- Specified by:
 containsin interfaceCollection<E extends @Nullable Object>- Specified by:
 containsin interfaceSet<E extends @Nullable Object>- Overrides:
 containsin classAbstractCollection<E extends @Nullable Object>
 
- 
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()
- Specified by:
 isEmptyin interfaceCollection<E extends @Nullable Object>- Specified by:
 isEmptyin interfaceSet<E extends @Nullable Object>- Overrides:
 isEmptyin classAbstractCollection<E extends @Nullable Object>
 
- 
remove
public boolean remove(@Nullable Object o)
- Specified by:
 removein interfaceCollection<E extends @Nullable Object>- Specified by:
 removein interfaceSet<E extends @Nullable Object>- Overrides:
 removein classAbstractCollection<E extends @Nullable Object>
 
- 
size
public int size()
- Specified by:
 sizein interfaceCollection<E extends @Nullable Object>- Specified by:
 sizein interfaceSet<E extends @Nullable Object>- Specified by:
 sizein classAbstractCollection<E extends @Nullable Object>
 
- 
removeAll
public boolean removeAll(Collection<?> c)
- Specified by:
 removeAllin interfaceCollection<E extends @Nullable Object>- Specified by:
 removeAllin interfaceSet<E extends @Nullable Object>- Overrides:
 removeAllin classAbstractSet<E extends @Nullable Object>
 
- 
retainAll
public boolean retainAll(Collection<?> c)
- Specified by:
 retainAllin interfaceCollection<E extends @Nullable Object>- Specified by:
 retainAllin interfaceSet<E extends @Nullable Object>- Overrides:
 retainAllin classAbstractCollection<E extends @Nullable Object>
 
 - 
 
 -