Package co.aikar.util

Class MRUMapCache<K,V>

java.lang.Object
java.util.AbstractMap<K,V>
co.aikar.util.MRUMapCache<K,V>
Type Parameters:
K - Key Type of the Map
V - Value Type of the Map
All Implemented Interfaces:
Map<K,V>

@Deprecated(forRemoval=true) public class MRUMapCache<K,V> extends AbstractMap<K,V>
Deprecated, for removal: This API element is subject to removal in a future version.
Implements a Most Recently Used cache in front of a backing map, to quickly access the last accessed result.
  • Constructor Details

    • MRUMapCache

      public MRUMapCache(@NotNull Map<K,V> backingMap)
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Method Details

    • size

      public int size()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      size in interface Map<K,V>
      Overrides:
      size in class AbstractMap<K,V>
    • isEmpty

      public boolean isEmpty()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      isEmpty in interface Map<K,V>
      Overrides:
      isEmpty in class AbstractMap<K,V>
    • containsKey

      public boolean containsKey(@Nullable Object key)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      containsKey in interface Map<K,V>
      Overrides:
      containsKey in class AbstractMap<K,V>
    • containsValue

      public boolean containsValue(@Nullable Object value)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      containsValue in interface Map<K,V>
      Overrides:
      containsValue in class AbstractMap<K,V>
    • get

      @Nullable public V get(@Nullable Object key)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      get in interface Map<K,V>
      Overrides:
      get in class AbstractMap<K,V>
    • put

      @Nullable public V put(@Nullable K key, @Nullable V value)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      put in interface Map<K,V>
      Overrides:
      put in class AbstractMap<K,V>
    • remove

      @Nullable public V remove(@Nullable Object key)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      remove in interface Map<K,V>
      Overrides:
      remove in class AbstractMap<K,V>
    • putAll

      public void putAll(@NotNull Map<? extends K,? extends V> m)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      putAll in interface Map<K,V>
      Overrides:
      putAll in class AbstractMap<K,V>
    • clear

      public void clear()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      clear in interface Map<K,V>
      Overrides:
      clear in class AbstractMap<K,V>
    • keySet

      @NotNull public Set<K> keySet()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      keySet in interface Map<K,V>
      Overrides:
      keySet in class AbstractMap<K,V>
    • values

      @NotNull public Collection<V> values()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      values in interface Map<K,V>
      Overrides:
      values in class AbstractMap<K,V>
    • entrySet

      @NotNull public Set<Map.Entry<K,V>> entrySet()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      entrySet in interface Map<K,V>
      Specified by:
      entrySet in class AbstractMap<K,V>
    • of

      @NotNull public static <K, V> Map<K,V> of(@NotNull Map<K,V> map)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Wraps the specified map with a most recently used cache
      Type Parameters:
      K - Key Type of the Map
      V - Value Type of the Map
      Parameters:
      map - Map to be wrapped
      Returns:
      Map