Interface IDataStore<K,V>

Type Parameters:
K - Type of the keys.
V - Type of the values.

public interface IDataStore<K,V>
Similar to Map, but with a more limited set of operations. This interface is used to provide a view of a data store that is not necessarily a map. The data store may be a map, but it may also be a list, a set, or any other data structure.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
    Like a Supplier for a IDataStore, but with the correct type parameters.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    contains(K key)
    Check if the data store contains a value for the given key.
    get(K key)
    Get the value for the given key.
    void
    put(K key, V value)
    Put a value for the given key.
    void
    remove(K key)
    Remove the mapping for the given key.
  • Method Details

    • contains

      boolean contains(K key)
      Check if the data store contains a value for the given key.
      Parameters:
      key - The key.
      Returns:
      True if the key is present.
    • get

      V get(K key)
      Get the value for the given key.
      Parameters:
      key - The key.
      Returns:
      The value, if it exists, or null otherwise.
    • put

      void put(K key, V value)
      Put a value for the given key.
      Parameters:
      key - The key.
      value - The value.
    • remove

      void remove(K key)
      Remove the mapping for the given key.
      Parameters:
      key - The key.