Package org.incendo.cloud.annotations
Interface DefaultValueRegistry<C>
- Type Parameters:
C- command sender type
Registry that stores mappings between names and
default value factories.-
Method Summary
Modifier and TypeMethodDescriptionReturns the default value with the givenname, if it exists.Registers the named default value.
-
Method Details
-
register
<T> @NonNull DefaultValueRegistry<C> register(@NonNull String name, @NonNull DefaultValueFactory<C, T> defaultValue) Registers the named default value.- Type Parameters:
T- default value type- Parameters:
name- name of the default valuedefaultValue- default value- Returns:
this
-
named
Returns the default value with the givenname, if it exists.- Parameters:
name- name of the default value- Returns:
- optional that contains the default value, if it has been
registered
-