Interface Store<K,​O>

  • All Known Implementing Classes:
    AbstractStore, GuavaStore

    public interface Store<K,​O>
    Store data.
    Since:
    2.0.0
    Author:
    Jerome Leleu
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.util.Optional<O> get​(K key)
      Get a value by key.
      void remove​(K key)
      Remove the value associated to the key.
      void set​(K key, O value)
      Set a value by its key.
    • Method Detail

      • get

        java.util.Optional<O> get​(K key)
        Get a value by key.
        Parameters:
        key - the key
        Returns:
        the object (optional)
      • set

        void set​(K key,
                 O value)
        Set a value by its key.
        Parameters:
        key - the key
        value - the value
      • remove

        void remove​(K key)
        Remove the value associated to the key.
        Parameters:
        key - the key