Module com.rezzedup.util.valuables
Package com.rezzedup.util.valuables
Interface AdaptedValue<S,O,V>
-
- Type Parameters:
S- storage typeO- output typeV- value type
- All Known Subinterfaces:
DefaultAdaptedValue<S,O,V>
public interface AdaptedValue<S,O,V> extends Adaptable<O,V>, Value<S,V>
A value that must be adapted to and from storage.
-
-
Method Summary
Static Methods Modifier and Type Method Description static <S,O,V>
AdaptedValue<S,O,V>of(Adapter<O,V> adapter, Value<S,O> value)Creates a newAdaptedValueby delegating to the provided arguments.
-
-
-
Method Detail
-
of
static <S,O,V> AdaptedValue<S,O,V> of(Adapter<O,V> adapter, Value<S,O> value)
Creates a newAdaptedValueby 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 typeO- output typeV- value type- Parameters:
adapter- the adaptervalue- an existing value implementation that gets and sets the value from storage in the original 'output' type- Returns:
- a new instance composed of the arguments
-
-