Module com.rezzedup.util.valuables
Package com.rezzedup.util.valuables
Interface DefaultAdaptedKeyValue<S,K,O,V>
-
- Type Parameters:
S- storage typeK- key typeO- output typeV- value type
- All Superinterfaces:
Adaptable<O,V>,AdaptedKeyValue<S,K,O,V>,Defaultable<V>,DefaultGetter<S,V>,DefaultKeyValue<S,K,V>,DefaultSetter<S,V>,DefaultValue<S,V>,Getter<S,V>,KeyHolder<K>,KeyValue<S,K,V>,Setter<S,V>,Value<S,V>
public interface DefaultAdaptedKeyValue<S,K,O,V> extends AdaptedKeyValue<S,K,O,V>, DefaultKeyValue<S,K,V>
A value that's associated with a default fallback, a key, and must be adapted to and from storage.
-
-
Method Summary
Static Methods Modifier and Type Method Description static <S,K,O,V>
DefaultAdaptedKeyValue<S,K,O,V>of(V def, AdaptedKeyValue<S,K,O,V> value)Creates a newDefaultAdaptedKeyValueby 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,K,O,V> DefaultAdaptedKeyValue<S,K,O,V> of(V def, AdaptedKeyValue<S,K,O,V> value)
Creates a newDefaultAdaptedKeyValueby 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:
def- the default fallback valuevalue- 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
-
-