Class AbstractDualBidiMap.View<K,V,E>
java.lang.Object
org.apache.commons.collections4.collection.AbstractCollectionDecorator<E>
org.apache.commons.collections4.bidimap.AbstractDualBidiMap.View<K,V,E>
- Type Parameters:
K
- the type of the keys in the map.V
- the type of the values in the map.E
- the type of the elements in the collection.
- All Implemented Interfaces:
Serializable
,Iterable<E>
,Collection<E>
- Direct Known Subclasses:
AbstractDualBidiMap.EntrySet
,AbstractDualBidiMap.KeySet
,AbstractDualBidiMap.Values
- Enclosing class:
AbstractDualBidiMap<K,
V>
protected abstract static class AbstractDualBidiMap.View<K,V,E>
extends AbstractCollectionDecorator<E>
Inner class View.
- See Also:
-
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionprotected
View
(Collection<E> coll, AbstractDualBidiMap<K, V> parent) Constructs a new instance. -
Method Summary
Methods inherited from class org.apache.commons.collections4.collection.AbstractCollectionDecorator
add, addAll, contains, containsAll, decorated, isEmpty, iterator, remove, setCollection, size, toArray, toArray, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, spliterator, stream
-
Field Details
-
parent
The parent map
-
-
Constructor Details
-
View
Constructs a new instance.- Parameters:
coll
- the collection view being decoratedparent
- the parent BidiMap
-
-
Method Details
-
clear
- Specified by:
clear
in interfaceCollection<K>
- Overrides:
clear
in classAbstractCollectionDecorator<E>
-
equals
- Specified by:
equals
in interfaceCollection<K>
- Overrides:
equals
in classObject
-
hashCode
- Specified by:
hashCode
in interfaceCollection<K>
- Overrides:
hashCode
in classObject
-
removeAll
- Specified by:
removeAll
in interfaceCollection<K>
- Overrides:
removeAll
in classAbstractCollectionDecorator<E>
-
removeIf
- Specified by:
removeIf
in interfaceCollection<K>
- Overrides:
removeIf
in classAbstractCollectionDecorator<E>
- Since:
- 4.4
-
retainAll
This implementation iterates over the elements of this bidi map, checking each element in turn to see if it's contained in
coll
. If it's not contained, it's removed from this bidi map. As a consequence, it is advised to use a collection type forcoll
that provides a fast (e.g. O(1)) implementation ofCollection.contains(Object)
.- Specified by:
retainAll
in interfaceCollection<K>
- Overrides:
retainAll
in classAbstractCollectionDecorator<E>
-