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 class
AbstractMultiValuedMap.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 private
KeysMultiSet()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
contains(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.int
getCount(java.lang.Object object)
Returns the number of occurrence of the given element in this multiset by iterating over its entrySet.boolean
isEmpty()
int
size()
Returns the number of elements in this multiset.protected int
uniqueElements()
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:AbstractMultiSet
Determines if the multiset contains the given element.- Specified by:
contains
in interfacejava.util.Collection<K>
- Overrides:
contains
in 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:AbstractMultiSet
Returns the number of elements in this multiset.
-
uniqueElements
protected int uniqueElements()
Description copied from class:AbstractMultiSet
Returns the number of unique elements in this multiset.- Specified by:
uniqueElements
in classAbstractMultiSet<K>
- Returns:
- the number of unique elements
-
getCount
public int getCount(java.lang.Object object)
Description copied from class:AbstractMultiSet
Returns 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:AbstractMultiSet
Creates an entry set iterator. Subclasses can override this to return iterators with different properties.- Specified by:
createEntrySetIterator
in classAbstractMultiSet<K>
- Returns:
- the entrySet iterator
-
-