Class AbstractMultiValuedMap.WrappedCollection
java.lang.Object
org.apache.commons.collections4.multimap.AbstractMultiValuedMap.WrappedCollection
- All Implemented Interfaces:
Iterable<V>,Collection<V>
- Direct Known Subclasses:
AbstractListValuedMap.WrappedList,AbstractSetValuedMap.WrappedSet
- Enclosing class:
AbstractMultiValuedMap<K,V>
Wrapped collection to handle add and remove on the collection returned
by get(object).
Currently, the wrapped collection is not cached and has to be retrieved from the underlying map. This is safe, but not very efficient and should be improved in subsequent releases. For this purpose, the scope of this collection is set to package private to simplify later refactoring.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanaddAll(Collection<? extends V> other) voidclear()booleanbooleancontainsAll(Collection<?> other) protected Collection<V> booleanisEmpty()iterator()booleanbooleanremoveAll(Collection<?> c) booleanretainAll(Collection<?> c) intsize()Object[]toArray()<T> T[]toArray(T[] a) toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
equals, hashCode, parallelStream, removeIf, spliterator, stream
-
Field Details
-
key
-
-
Constructor Details
-
WrappedCollection
-
-
Method Details
-
getMapping
-
add
- Specified by:
addin interfaceCollection<V>
-
addAll
- Specified by:
addAllin interfaceCollection<V>
-
clear
public void clear()- Specified by:
clearin interfaceCollection<V>
-
iterator
-
size
public int size()- Specified by:
sizein interfaceCollection<V>
-
contains
- Specified by:
containsin interfaceCollection<V>
-
containsAll
- Specified by:
containsAllin interfaceCollection<V>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceCollection<V>
-
remove
- Specified by:
removein interfaceCollection<V>
-
removeAll
- Specified by:
removeAllin interfaceCollection<V>
-
retainAll
- Specified by:
retainAllin interfaceCollection<V>
-
toArray
- Specified by:
toArrayin interfaceCollection<V>
-
toArray
public <T> T[] toArray(T[] a) - Specified by:
toArrayin interfaceCollection<V>
-
toString
-