Interface ValueStorage<K,V>

Type Parameters:
K - type of keys used for identifying values
V - type of stored values
All Known Implementing Classes:
AbstractValueStorage, SimpleValueStorage

public interface ValueStorage<K,V>
Storage of values which is made for sharing values which is unavailable via direct standard APIs such as initializing static final fields of generated classes.
  • Method Summary

    Modifier and Type
    Method
    Description
    Retrieves (gets and removes) the value stored by the given key.
    storeValue(V value)
    Stores the given non-null value returning its unique key.
  • Method Details

    • storeValue

      K storeValue(@NonNull V value)
      Stores the given non-null value returning its unique key.
      Parameters:
      value - non-null value to store
      Returns:
      unique key by which the stored value may be retrieved
    • retrieveValue

      V retrieveValue(K key)
      Retrieves (gets and removes) the value stored by the given key.
      Parameters:
      key - unique key by which the value should be found
      Returns:
      value which was stored by the given key or null if there was no value stored