Package org.incendo.cloud.annotations
Interface DefaultValueFactory<C,T>
- Type Parameters:
C- command sender typeT- value type
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Factory that produces default value instances.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <C,T> @NonNull DefaultValueFactory <C, T> constant(@NonNull DefaultValue<C, T> defaultValue) Creates a default value factory that always returns the givendefaultValue.Creates the default value.
-
Method Details
-
constant
Creates a default value factory that always returns the givendefaultValue.- Type Parameters:
C- command sender typeT- type of the value- Parameters:
defaultValue- default value instance- Returns:
- the created factory
-
create
Creates the default value.- Parameters:
parameter- parameter to create the default value for- Returns:
- the default value
-