org.apache.solr.util

## Class MapListener<K,V>

- java.lang.Object
- - com.google.common.collect.ForwardingObject
  - - com.google.common.collect.ForwardingMap<K,V>
    - - org.apache.solr.util.MapListener<K,V>

- All Implemented Interfaces:
    Map<K,V>

      public class MapListener<K,V>
      extends com.google.common.collect.ForwardingMap<K,V>

  Wraps another map, keeping track of each key that was seen via `get(Object)` or `remove(Object)`.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class com.google.common.collect.ForwardingMap

      `com.google.common.collect.ForwardingMap.StandardEntrySet, com.google.common.collect.ForwardingMap.StandardKeySet, com.google.common.collect.ForwardingMap.StandardValues`

    - ### Nested classes/interfaces inherited from interface java.util.Map

      `Map.Entry<K,V>`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MapListener(Map<K,V> target)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected Map<K,V>` | `delegate()`
    `V` | `get(Object key)`
    `Set<K>` | `getSeenKeys()`
    `V` | `remove(Object key)`

    - ### Methods inherited from class com.google.common.collect.ForwardingMap

      `clear, containsKey, containsValue, entrySet, equals, hashCode, isEmpty, keySet, put, putAll, size, standardClear, standardContainsKey, standardContainsValue, standardEquals, standardHashCode, standardIsEmpty, standardPutAll, standardRemove, standardToString, values`

    - ### Methods inherited from class com.google.common.collect.ForwardingObject

      `toString`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface java.util.Map

      `compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll`

- - ### Constructor Detail

    - #### MapListener

          public MapListener(Map<K,V> target)

  - ### Method Detail

    - #### getSeenKeys

          public Set<K> getSeenKeys()

    - #### get

          public V get(Object key)

      Specified by:
        `get` in interface `Map<K,V>`
      Overrides:
        `get` in class `com.google.common.collect.ForwardingMap<K,V>`

    - #### remove

          public V remove(Object key)

      Specified by:
        `remove` in interface `Map<K,V>`
      Overrides:
        `remove` in class `com.google.common.collect.ForwardingMap<K,V>`

    - #### delegate

          protected Map<K,V> delegate()

      Overrides:
        `delegate` in class `com.google.common.collect.ForwardingMap<K,V>`

Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.