Class AbstractDualBidiMap.View<K,V,E>
- java.lang.Object
-
- org.apache.openjpa.lib.util.collections.AbstractCollectionDecorator<E>
-
- org.apache.openjpa.lib.util.collections.AbstractDualBidiMap.View<K,V,E>
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Iterable<E>
,java.util.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:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected AbstractDualBidiMap<K,V>
parent
The parent map
-
Constructor Summary
Constructors Modifier Constructor Description protected
View(java.util.Collection<E> coll, AbstractDualBidiMap<K,V> parent)
Constructs a new view of the BidiMap.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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)
-
Methods inherited from class org.apache.openjpa.lib.util.collections.AbstractCollectionDecorator
add, addAll, contains, containsAll, decorated, isEmpty, iterator, remove, setCollection, size, toArray, toArray, toString
-
-
-
-
Field Detail
-
parent
protected final AbstractDualBidiMap<K,V> parent
The parent map
-
-
Constructor Detail
-
View
protected View(java.util.Collection<E> coll, AbstractDualBidiMap<K,V> parent)
Constructs a new view of the BidiMap.- Parameters:
coll
- the collection view being decoratedparent
- the parent BidiMap
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object object)
- Specified by:
equals
in interfacejava.util.Collection<K>
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfacejava.util.Collection<K>
- Overrides:
hashCode
in classjava.lang.Object
-
removeIf
public boolean removeIf(java.util.function.Predicate<? super E> filter)
- Specified by:
removeIf
in interfacejava.util.Collection<K>
- Overrides:
removeIf
in classAbstractCollectionDecorator<E>
- Since:
- 4.4
-
removeAll
public boolean removeAll(java.util.Collection<?> coll)
- Specified by:
removeAll
in interfacejava.util.Collection<K>
- Overrides:
removeAll
in classAbstractCollectionDecorator<E>
-
retainAll
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 forcoll
that provides a fast (e.g. O(1)) implementation ofCollection.contains(Object)
.- Specified by:
retainAll
in interfacejava.util.Collection<K>
- Overrides:
retainAll
in classAbstractCollectionDecorator<E>
-
clear
public void clear()
- Specified by:
clear
in interfacejava.util.Collection<K>
- Overrides:
clear
in classAbstractCollectionDecorator<E>
-
-