Package space.arim.dazzleconf.engine
Interface DefaultValues<V>
- Type Parameters:
V- the value type
public interface DefaultValues<V>
Storage for default values
-
Method Summary
Modifier and TypeMethodDescription@NonNull VGets the default value@NonNull VGets the value if missing in an existing configurationstatic <V> @NonNull DefaultValues<V> simple(@NonNull V defaultValue) Creates a simple implementation from the given value.
-
Method Details
-
defaultValue
@NonNull V defaultValue()Gets the default value- Returns:
- the default value
-
ifMissing
@NonNull V ifMissing()Gets the value if missing in an existing configuration- Returns:
- the value if missing
-
simple
Creates a simple implementation from the given value.The value provided doubles as the default value and the missing value.
- Type Parameters:
V- the type being provided- Parameters:
defaultValue- the value to use- Returns:
- a default values implementation
-