Interface Storage<K,​V,​P extends Function<K,​V>,​R extends BiPredicate<K,​V>>

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void clear()
      Removes all keys
      V get​(K key)
      Returns the value associated with the given key, or null if expired.
      Set<K> keys​(R test)
      Returns all the keys that match the given predicate.
      void remove​(K key)
      Removes the given key.
      void removeAll​(Collection<K> keys)
      Removes all the given keys.
      void removeIf​(R test)
      Removes all the values that matches against the given predicate
      void set​(K key, V value)
      Adds a value to the store
    • Method Detail

      • clear

        void clear()
        Removes all keys
      • get

        V get​(K key)
        Returns the value associated with the given key, or null if expired.
      • keys

        Set<K> keys​(R test)
        Returns all the keys that match the given predicate. The resulting set is NOT backed by the actual storage.
      • remove

        void remove​(K key)
        Removes the given key.
      • removeAll

        void removeAll​(Collection<K> keys)
        Removes all the given keys.
      • removeIf

        void removeIf​(R test)
        Removes all the values that matches against the given predicate
      • set

        void set​(K key,
                 V value)
        Adds a value to the store