Package org.apache.commons.collections4.bidimap

# 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:
  - Serialized Form

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected final AbstractDualBidiMap<K,V>`
  `parent`
  The parent map

- ## Constructor Summary

  Constructors
  Modifier
  Constructor
  Description
  `protected`
  `View(Collection<E> coll, AbstractDualBidiMap<K,V> parent)`
  Constructs a new instance.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `clear()`
  `boolean`
  `equals(Object object)`
  `int`
  `hashCode()`
  `boolean`
  `removeAll(Collection<?> coll)`
  `boolean`
  `removeIf(Predicate<? super E> filter)`
  `boolean`
  `retainAll(Collection<?> coll)`

  ### 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`

  ### Methods inherited from interface java.lang.Iterable

  `forEach`

- ## Field Details

  - ### parent

    protected final AbstractDualBidiMap<K,V> parent
    The parent map

- ## Constructor Details

  - ### View

    protected View(Collection<E> coll, AbstractDualBidiMap<K,V> parent)
    Constructs a new instance.
    Parameters:
      `coll` - the collection view being decorated
      `parent` - the parent BidiMap

- ## Method Details

  - ### clear

    public void clear()
    Specified by:
      `clear` in interface `Collection<K>`
    Overrides:
      `clear` in class `AbstractCollectionDecorator<E>`

  - ### equals

    public boolean equals(Object object)
    Specified by:
      `equals` in interface `Collection<K>`
    Overrides:
      `equals` in class `Object`

  - ### hashCode

    public int hashCode()
    Specified by:
      `hashCode` in interface `Collection<K>`
    Overrides:
      `hashCode` in class `Object`

  - ### removeAll

    public boolean removeAll(Collection<?> coll)
    Specified by:
      `removeAll` in interface `Collection<K>`
    Overrides:
      `removeAll` in class `AbstractCollectionDecorator<E>`

  - ### removeIf

    public boolean removeIf(Predicate<? super E> filter)
    Specified by:
      `removeIf` in interface `Collection<K>`
    Overrides:
      `removeIf` in class `AbstractCollectionDecorator<E>`
    Since:
      4.4

  - ### retainAll

    public boolean retainAll(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)`.

    Specified by:
      `retainAll` in interface `Collection<K>`
    Overrides:
      `retainAll` in class `AbstractCollectionDecorator<E>`