Class AbstractMultiValuedMap.KeysMultiSet
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- org.apache.commons.collections4.multiset.AbstractMultiSet<K>
-
- org.apache.commons.collections4.multimap.AbstractMultiValuedMap.KeysMultiSet
-
- All Implemented Interfaces:
java.lang.Iterable<K>,java.util.Collection<K>,MultiSet<K>
- Enclosing class:
- AbstractMultiValuedMap<K,V>
private class AbstractMultiValuedMap.KeysMultiSet extends AbstractMultiSet<K>
Inner class that provides a MultiSetkeys view.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private classAbstractMultiValuedMap.KeysMultiSet.MapEntryTransformer-
Nested classes/interfaces inherited from class org.apache.commons.collections4.multiset.AbstractMultiSet
AbstractMultiSet.AbstractEntry<E>, AbstractMultiSet.EntrySet<E>, AbstractMultiSet.UniqueSet<E>
-
Nested classes/interfaces inherited from interface org.apache.commons.collections4.MultiSet
MultiSet.Entry<E>
-
-
Constructor Summary
Constructors Modifier Constructor Description privateKeysMultiSet()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancontains(java.lang.Object o)Determines if the multiset contains the given element.protected java.util.Iterator<MultiSet.Entry<K>>createEntrySetIterator()Creates an entry set iterator.intgetCount(java.lang.Object object)Returns the number of occurrence of the given element in this multiset by iterating over its entrySet.booleanisEmpty()intsize()Returns the number of elements in this multiset.protected intuniqueElements()Returns the number of unique elements in this multiset.-
Methods inherited from class org.apache.commons.collections4.multiset.AbstractMultiSet
add, add, clear, createEntrySet, createUniqueSet, createUniqueSetIterator, doReadObject, doWriteObject, entrySet, equals, hashCode, iterator, remove, remove, removeAll, setCount, toString, uniqueSet
-
Methods inherited from class java.util.AbstractCollection
addAll, containsAll, retainAll, toArray, toArray
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Collection
addAll, parallelStream, removeIf, spliterator, stream, toArray, toArray, toArray
-
Methods inherited from interface org.apache.commons.collections4.MultiSet
containsAll, retainAll
-
-
-
-
Method Detail
-
contains
public boolean contains(java.lang.Object o)
Description copied from class:AbstractMultiSetDetermines if the multiset contains the given element.- Specified by:
containsin interfacejava.util.Collection<K>- Overrides:
containsin classAbstractMultiSet<K>- Parameters:
o- the object to search for- Returns:
- true if the multiset contains the given element
-
isEmpty
public boolean isEmpty()
-
size
public int size()
Description copied from class:AbstractMultiSetReturns the number of elements in this multiset.
-
uniqueElements
protected int uniqueElements()
Description copied from class:AbstractMultiSetReturns the number of unique elements in this multiset.- Specified by:
uniqueElementsin classAbstractMultiSet<K>- Returns:
- the number of unique elements
-
getCount
public int getCount(java.lang.Object object)
Description copied from class:AbstractMultiSetReturns the number of occurrence of the given element in this multiset by iterating over its entrySet.
-
createEntrySetIterator
protected java.util.Iterator<MultiSet.Entry<K>> createEntrySetIterator()
Description copied from class:AbstractMultiSetCreates an entry set iterator. Subclasses can override this to return iterators with different properties.- Specified by:
createEntrySetIteratorin classAbstractMultiSet<K>- Returns:
- the entrySet iterator
-
-