protected abstract static class AbstractDualBidiMap.View<K,V,E> extends AbstractCollectionDecorator<E>
Modifier and Type | Field and Description |
---|---|
protected AbstractDualBidiMap<K,V> |
parent
The parent map
|
private static long |
serialVersionUID
Generated serial version ID.
|
Modifier | Constructor and Description |
---|---|
protected |
View(java.util.Collection<E> coll,
AbstractDualBidiMap<K,V> parent)
Constructs a new view of the BidiMap.
|
Modifier and Type | Method and Description |
---|---|
void |
clear() |
boolean |
equals(java.lang.Object object) |
int |
hashCode() |
boolean |
removeAll(java.util.Collection<?> coll) |
boolean |
removeIf(java.util.function.Predicate<? super E> filter) |
boolean |
retainAll(java.util.Collection<?> coll) |
add, addAll, contains, containsAll, decorated, isEmpty, iterator, remove, setCollection, size, toArray, toArray, toString
private static final long serialVersionUID
protected final AbstractDualBidiMap<K,V> parent
protected View(java.util.Collection<E> coll, AbstractDualBidiMap<K,V> parent)
coll
- the collection view being decoratedparent
- the parent BidiMappublic boolean equals(java.lang.Object object)
equals
in interface java.util.Collection<E>
equals
in class java.lang.Object
public int hashCode()
hashCode
in interface java.util.Collection<E>
hashCode
in class java.lang.Object
public boolean removeIf(java.util.function.Predicate<? super E> filter)
removeIf
in interface java.util.Collection<E>
removeIf
in class AbstractCollectionDecorator<E>
public boolean removeAll(java.util.Collection<?> coll)
removeAll
in interface java.util.Collection<E>
removeAll
in class AbstractCollectionDecorator<E>
public boolean retainAll(java.util.Collection<?> coll)
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 for
coll
that provides a fast (e.g. O(1)) implementation of
Collection.contains(Object)
.
retainAll
in interface java.util.Collection<E>
retainAll
in class AbstractCollectionDecorator<E>
public void clear()
clear
in interface java.util.Collection<E>
clear
in class AbstractCollectionDecorator<E>