Interface ValueStorage<K,V>
- Type Parameters:
K- type of keys used for identifying valuesV- 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 TypeMethodDescriptionretrieveValue(K key) 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
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
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
nullif there was no value stored
-