Interface StateHolder<K,V>

Type Parameters:
K - type of Keys
V - type of Values

public interface StateHolder<K,V>
A Map like structure that can hold key value mappings.
  • Method Summary

    Modifier and Type
    Method
    Description
    Retrieves all the entries in the StateHolder as a Set of Map.Entry instances.
    get(K key)
    Retrieves the value mapped to the given key
    putIfAbsent(K key, V value)
    If the specified key is not already associated with a value (or is mapped to null) associates it with the given value and returns null, else returns the current value.
  • Method Details

    • putIfAbsent

      V putIfAbsent(K key, V value)
      If the specified key is not already associated with a value (or is mapped to null) associates it with the given value and returns null, else returns the current value.
      Parameters:
      key - a key
      value - a value
      Returns:
      the previous value associated with the specified key, or null if there was no mapping for the key.
    • get

      V get(K key)
      Retrieves the value mapped to the given key
      Parameters:
      key - a key
      Returns:
      the value mapped to the key
    • entrySet

      Set<Map.Entry<K,V>> entrySet()
      Retrieves all the entries in the StateHolder as a Set of Map.Entry instances.
      Returns:
      the set of this StateHolder mappings