Module com.rezzedup.util.valuables
Package com.rezzedup.util.valuables
Interface AdaptedKeyValue<S,K,O,V>
-
- Type Parameters:
S- storage typeK- key typeO- output typeV- value type
- All Superinterfaces:
Adaptable<O,V>,Getter<S,V>,KeyHolder<K>,KeyValue<S,K,V>,Setter<S,V>,Value<S,V>
- All Known Subinterfaces:
DefaultAdaptedKeyValue<S,K,O,V>
public interface AdaptedKeyValue<S,K,O,V> extends Adaptable<O,V>, KeyValue<S,K,V>
A value that's associated with a key and must be adapted to and from storage.
-
-
Method Summary
Static Methods Modifier and Type Method Description static <S,K,O,V>
AdaptedKeyValue<S,K,O,V>of(Adapter<O,V> adapter, KeyValue<S,K,O> value)Creates a newAdaptedKeyValueby delegating to the provided arguments.
-
-
-
Method Detail
-
of
static <S,K,O,V> AdaptedKeyValue<S,K,O,V> of(Adapter<O,V> adapter, KeyValue<S,K,O> value)
Creates a newAdaptedKeyValueby delegating to the provided arguments. Getting the value will always deserialize from storage, and setting the value will always serialize into storage.- Type Parameters:
S- storage typeK- key typeO- output typeV- value type- Parameters:
adapter- the adaptervalue- an existing key value implementation that gets and sets the value from storage in the original 'output' type- Returns:
- a new instance composed of the arguments
-
-