Class WeakValueCache<K,V>

java.lang.Object
de.inetsoftware.classparser.WeakValueCache<K,V>
Type Parameters:
K - the key type
V - the value type

public class WeakValueCache<K,V> extends Object
A simple cache for weak values.
  • Field Details

  • Constructor Details

    • WeakValueCache

      public WeakValueCache()
  • Method Details

    • put

      public void put(K key, V value)
      Put a value
      Parameters:
      key - the key
      value - the value
    • get

      public V get(K key)
      Get the value if in the cache
      Parameters:
      key - the key
      Returns:
      the value or null