Class AbstractMultiValuedMap.KeysMultiSet
java.lang.Object
java.util.AbstractCollection<K>
org.apache.commons.collections4.multiset.AbstractMultiSet<K>
org.apache.commons.collections4.multimap.AbstractMultiValuedMap.KeysMultiSet
- All Implemented Interfaces:
Iterable<K>
,Collection<K>
,MultiSet<K>
- Enclosing class:
AbstractMultiValuedMap<K,
V>
Inner class that provides a MultiSet keys view.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate final class
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 -
Method Summary
Modifier and TypeMethodDescriptionboolean
Determines if the multiset contains the given element.protected Iterator
<MultiSet.Entry<K>> Creates an entry set iterator.int
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
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
Methods inherited from interface org.apache.commons.collections4.MultiSet
containsAll, retainAll
-
Constructor Details
-
KeysMultiSet
private KeysMultiSet()
-
-
Method Details
-
contains
Description copied from class:AbstractMultiSet
Determines if the multiset contains the given element.- Specified by:
contains
in interfaceCollection<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()- Specified by:
isEmpty
in interfaceCollection<K>
- Overrides:
isEmpty
in classAbstractCollection<K>
-
size
public int size()Description copied from class:AbstractMultiSet
Returns the number of elements in this multiset.- Specified by:
size
in interfaceCollection<K>
- Specified by:
size
in interfaceMultiSet<K>
- Overrides:
size
in classAbstractMultiSet<K>
- Returns:
- current size of the 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
Description copied from class:AbstractMultiSet
Returns the number of occurrence of the given element in this multiset by iterating over its entrySet. -
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
-