Module com.rezzedup.util.valuables
Package com.rezzedup.util.valuables
Interface DefaultAdaptedValue<S,O,V>
-
- Type Parameters:
S- storage typeO- output typeV- value type
- All Superinterfaces:
Adaptable<O,V>,AdaptedValue<S,O,V>,Defaultable<V>,DefaultGetter<S,V>,DefaultSetter<S,V>,DefaultValue<S,V>,Getter<S,V>,Setter<S,V>,Value<S,V>
public interface DefaultAdaptedValue<S,O,V> extends AdaptedValue<S,O,V>, DefaultValue<S,V>
A value that's associated with a default fallback and must be adapted to and from storage.
-
-
Method Summary
Static Methods Modifier and Type Method Description static <S,O,V>
DefaultAdaptedValue<S,O,V>of(V def, AdaptedValue<S,O,V> value)Creates a newDefaultAdaptedValueby delegating to the provided arguments.-
Methods inherited from interface com.rezzedup.util.valuables.Defaultable
getDefaultValue
-
Methods inherited from interface com.rezzedup.util.valuables.DefaultGetter
getOrDefault
-
Methods inherited from interface com.rezzedup.util.valuables.DefaultValue
setAsDefault, setAsDefaultIfUnset
-
-
-
-
Method Detail
-
of
static <S,O,V> DefaultAdaptedValue<S,O,V> of(V def, AdaptedValue<S,O,V> value)
Creates a newDefaultAdaptedValueby 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:
value- 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
-
-