Package org.jboss.resteasy.client.jaxrs.internal

## Class TrackingMap<V>

- java.lang.Object
- - org.jboss.resteasy.specimpl.MultivaluedTreeMap<String,​V>
  - - org.jboss.resteasy.util.CaseInsensitiveMap<V>
    - - org.jboss.resteasy.client.jaxrs.internal.TrackingMap<V>

- All Implemented Interfaces:
    `Serializable`, `Cloneable`, `Map<String,​List<V>>`, `javax.ws.rs.core.MultivaluedMap<String,​V>`

      public class TrackingMap<V>
      extends CaseInsensitiveMap<V>
      implements javax.ws.rs.core.MultivaluedMap<String,​V>, Cloneable

  A decorator class to track changes to the underlying map. Tracks the keys that are either added/replaced/modified in addedOrUpdatedKeys. Tracks the keys that are removed in removedKeys.

  Known Limitation: The get and getFirst methods returns the list(since this is an instance of MultivaluedMap) value of the given key. Any direct changes to the underlying list will not be tracked.

  See Also:
    Serialized Form

- - ### Nested Class Summary

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

      `Map.Entry<K extends Object,​V extends Object>`

  - ### Field Summary

    - ### Fields inherited from class org.jboss.resteasy.util.CaseInsensitiveMap

      `CASE_INSENSITIVE_ORDER`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `TrackingMap​(CaseInsensitiveMap<V> delegate)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `add​(String key, V value)` |
    `void` | `addAll​(String key, List<V> valueList)` |
    `void` | `addAll​(String key, V... newValues)` |
    `void` | `addFirst​(String key, V value)` |
    `void` | `clear()` |
    `TrackingMap<V>` | `clone()` |
    `List<V>` | `compute​(String key, BiFunction<? super String,​? super List<V>,​? extends List<V>> remappingFunction)` |
    `List<V>` | `computeIfAbsent​(String key, Function<? super String,​? extends List<V>> mappingFunction)` |
    `List<V>` | `computeIfPresent​(String key, BiFunction<? super String,​? super List<V>,​? extends List<V>> remappingFunction)` |
    `boolean` | `containsKey​(Object key)` |
    `boolean` | `containsValue​(Object value)` |
    `Set<Map.Entry<String,​List<V>>>` | `entrySet()` |
    `boolean` | `equals​(Object o)` |
    `boolean` | `equalsIgnoreValueOrder​(javax.ws.rs.core.MultivaluedMap<String,​V> omap)` |
    `void` | `forEach​(BiConsumer<? super String,​? super List<V>> action)` |
    `List<V>` | `get​(Object key)` |
    `Set<String>` | `getAddedOrUpdatedKeys()` |
    `V` | `getFirst​(String key)` |
    `List<V>` | `getOrDefault​(Object key, List<V> defaultValue)` |
    `Set<String>` | `getRemovedKeys()` |
    `int` | `hashCode()` |
    `boolean` | `isEmpty()` |
    `Set<String>` | `keySet()` |
    `List<V>` | `merge​(String key, List<V> value, BiFunction<? super List<V>,​? super List<V>,​? extends List<V>> remappingFunction)` |
    `List<V>` | `put​(String key, List<V> value)` |
    `void` | `putAll​(Map<? extends String,​? extends List<V>> t)` |
    `List<V>` | `putIfAbsent​(String key, List<V> value)` |
    `void` | `putSingle​(String key, V value)` |
    `List<V>` | `remove​(Object key)` |
    `boolean` | `remove​(Object key, Object value)` |
    `List<V>` | `replace​(String key, List<V> value)` |
    `boolean` | `replace​(String key, List<V> oldValue, List<V> newValue)` |
    `void` | `replaceAll​(BiFunction<? super String,​? super List<V>,​? extends List<V>> function)` |
    `int` | `size()` |
    `String` | `toString()` |
    `Collection<List<V>>` | `values()` |

    - ### Methods inherited from class org.jboss.resteasy.specimpl.MultivaluedTreeMap

      `addAll, clone, copy, toString`

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

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

- - ### Constructor Detail

    - #### TrackingMap

          public TrackingMap​(CaseInsensitiveMap<V> delegate)

  - ### Method Detail

    - #### getAddedOrUpdatedKeys

          public Set<String> getAddedOrUpdatedKeys()

    - #### getRemovedKeys

          public Set<String> getRemovedKeys()

    - #### add

          public void add​(String key,
                          V value)

      Specified by:
        `add` in interface `javax.ws.rs.core.MultivaluedMap<String,​V>`
      Overrides:
        `add` in class `MultivaluedTreeMap<String,​V>`

    - #### addFirst

          public void addFirst​(String key,
                               V value)

      Specified by:
        `addFirst` in interface `javax.ws.rs.core.MultivaluedMap<String,​V>`
      Overrides:
        `addFirst` in class `MultivaluedTreeMap<String,​V>`

    - #### put

          public List<V> put​(String key,
                             List<V> value)

      Specified by:
        `put` in interface `Map<String,​List<V>>`
      Overrides:
        `put` in class `MultivaluedTreeMap<String,​V>`

    - #### putSingle

          public void putSingle​(String key,
                                V value)

      Specified by:
        `putSingle` in interface `javax.ws.rs.core.MultivaluedMap<String,​V>`
      Overrides:
        `putSingle` in class `MultivaluedTreeMap<String,​V>`

    - #### replace

          public boolean replace​(String key,
                                 List<V> oldValue,
                                 List<V> newValue)

      Specified by:
        `replace` in interface `Map<String,​List<V>>`

    - #### replace

          public List<V> replace​(String key,
                                 List<V> value)

      Specified by:
        `replace` in interface `Map<String,​List<V>>`

    - #### addAll

          public void addAll​(String key,
                             List<V> valueList)

      Specified by:
        `addAll` in interface `javax.ws.rs.core.MultivaluedMap<String,​V>`
      Overrides:
        `addAll` in class `MultivaluedTreeMap<String,​V>`

    - #### addAll

          public void addAll​(String key,
                             V... newValues)

      Specified by:
        `addAll` in interface `javax.ws.rs.core.MultivaluedMap<String,​V>`
      Overrides:
        `addAll` in class `MultivaluedTreeMap<String,​V>`

    - #### merge

          public List<V> merge​(String key,
                               List<V> value,
                               BiFunction<? super List<V>,​? super List<V>,​? extends List<V>> remappingFunction)

      Specified by:
        `merge` in interface `Map<String,​List<V>>`

    - #### putAll

          public void putAll​(Map<? extends String,​? extends List<V>> t)

      Specified by:
        `putAll` in interface `Map<String,​List<V>>`
      Overrides:
        `putAll` in class `MultivaluedTreeMap<String,​V>`

    - #### replaceAll

          public void replaceAll​(BiFunction<? super String,​? super List<V>,​? extends List<V>> function)

      Specified by:
        `replaceAll` in interface `Map<String,​List<V>>`

    - #### putIfAbsent

          public List<V> putIfAbsent​(String key,
                                     List<V> value)

      Specified by:
        `putIfAbsent` in interface `Map<String,​List<V>>`

    - #### computeIfAbsent

          public List<V> computeIfAbsent​(String key,
                                         Function<? super String,​? extends List<V>> mappingFunction)

      Specified by:
        `computeIfAbsent` in interface `Map<String,​List<V>>`

    - #### computeIfPresent

          public List<V> computeIfPresent​(String key,
                                          BiFunction<? super String,​? super List<V>,​? extends List<V>> remappingFunction)

      Specified by:
        `computeIfPresent` in interface `Map<String,​List<V>>`

    - #### compute

          public List<V> compute​(String key,
                                 BiFunction<? super String,​? super List<V>,​? extends List<V>> remappingFunction)

      Specified by:
        `compute` in interface `Map<String,​List<V>>`

    - #### remove

          public List<V> remove​(Object key)

      Specified by:
        `remove` in interface `Map<String,​List<V>>`
      Overrides:
        `remove` in class `MultivaluedTreeMap<String,​V>`

    - #### remove

          public boolean remove​(Object key,
                                Object value)

      Specified by:
        `remove` in interface `Map<String,​List<V>>`

    - #### clear

          public void clear()

      Specified by:
        `clear` in interface `Map<String,​List<V>>`
      Overrides:
        `clear` in class `MultivaluedTreeMap<String,​V>`

    - #### containsKey

          public boolean containsKey​(Object key)

      Specified by:
        `containsKey` in interface `Map<String,​List<V>>`
      Overrides:
        `containsKey` in class `MultivaluedTreeMap<String,​V>`

    - #### containsValue

          public boolean containsValue​(Object value)

      Specified by:
        `containsValue` in interface `Map<String,​List<V>>`
      Overrides:
        `containsValue` in class `MultivaluedTreeMap<String,​V>`

    - #### entrySet

          public Set<Map.Entry<String,​List<V>>> entrySet()

      Specified by:
        `entrySet` in interface `Map<String,​List<V>>`
      Overrides:
        `entrySet` in class `MultivaluedTreeMap<String,​V>`

    - #### equals

          public boolean equals​(Object o)

      Specified by:
        `equals` in interface `Map<String,​List<V>>`
      Overrides:
        `equals` in class `MultivaluedTreeMap<String,​V>`

    - #### get

          public List<V> get​(Object key)

      Specified by:
        `get` in interface `Map<String,​List<V>>`
      Overrides:
        `get` in class `MultivaluedTreeMap<String,​V>`

    - #### getFirst

          public V getFirst​(String key)

      Specified by:
        `getFirst` in interface `javax.ws.rs.core.MultivaluedMap<String,​V>`
      Overrides:
        `getFirst` in class `MultivaluedTreeMap<String,​V>`

    - #### hashCode

          public int hashCode()

      Specified by:
        `hashCode` in interface `Map<String,​List<V>>`
      Overrides:
        `hashCode` in class `MultivaluedTreeMap<String,​V>`

    - #### isEmpty

          public boolean isEmpty()

      Specified by:
        `isEmpty` in interface `Map<String,​List<V>>`
      Overrides:
        `isEmpty` in class `MultivaluedTreeMap<String,​V>`

    - #### keySet

          public Set<String> keySet()

      Specified by:
        `keySet` in interface `Map<String,​List<V>>`
      Overrides:
        `keySet` in class `MultivaluedTreeMap<String,​V>`

    - #### size

          public int size()

      Specified by:
        `size` in interface `Map<String,​List<V>>`
      Overrides:
        `size` in class `MultivaluedTreeMap<String,​V>`

    - #### values

          public Collection<List<V>> values()

      Specified by:
        `values` in interface `Map<String,​List<V>>`
      Overrides:
        `values` in class `MultivaluedTreeMap<String,​V>`

    - #### equalsIgnoreValueOrder

          public boolean equalsIgnoreValueOrder​(javax.ws.rs.core.MultivaluedMap<String,​V> omap)

      Specified by:
        `equalsIgnoreValueOrder` in interface `javax.ws.rs.core.MultivaluedMap<String,​V>`
      Overrides:
        `equalsIgnoreValueOrder` in class `MultivaluedTreeMap<String,​V>`

    - #### getOrDefault

          public List<V> getOrDefault​(Object key,
                                      List<V> defaultValue)

      Specified by:
        `getOrDefault` in interface `Map<String,​List<V>>`

    - #### forEach

          public void forEach​(BiConsumer<? super String,​? super List<V>> action)

      Specified by:
        `forEach` in interface `Map<String,​List<V>>`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `MultivaluedTreeMap<String,​V>`

    - #### clone

          public TrackingMap<V> clone()

      Overrides:
        `clone` in class `MultivaluedTreeMap<String,​V>`