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 TypeMethodDescriptionboolean
boolean
addAll
(Collection<? extends V> other) void
clear()
boolean
boolean
containsAll
(Collection<?> other) protected Collection
<V> boolean
isEmpty()
iterator()
boolean
boolean
removeAll
(Collection<?> c) boolean
retainAll
(Collection<?> c) int
size()
Object[]
toArray()
<T> T[]
toArray
(T[] a) toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
equals, hashCode, parallelStream, removeIf, spliterator, stream
-
Field Details
-
key
-
-
Constructor Details
-
WrappedCollection
-
-
Method Details
-
getMapping
-
add
- Specified by:
add
in interfaceCollection<V>
-
addAll
- Specified by:
addAll
in interfaceCollection<V>
-
clear
public void clear()- Specified by:
clear
in interfaceCollection<V>
-
iterator
-
size
public int size()- Specified by:
size
in interfaceCollection<V>
-
contains
- Specified by:
contains
in interfaceCollection<V>
-
containsAll
- Specified by:
containsAll
in interfaceCollection<V>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmpty
in interfaceCollection<V>
-
remove
- Specified by:
remove
in interfaceCollection<V>
-
removeAll
- Specified by:
removeAll
in interfaceCollection<V>
-
retainAll
- Specified by:
retainAll
in interfaceCollection<V>
-
toArray
- Specified by:
toArray
in interfaceCollection<V>
-
toArray
public <T> T[] toArray(T[] a) - Specified by:
toArray
in interfaceCollection<V>
-
toString
-