Interface Cache<K,​V>


  • public interface Cache<K,​V>
    A cache from keys to values.
    • Method Detail

      • computeIfAbsent

        V computeIfAbsent​(K key,
                          Function<? super K,​? extends V> mappingFunction)
        Returns the cached value associated with the provided key. If no value is cached yet, computes the value using mappingFunction, stores the result, and returns it.