Allow Parameters to be Optional<> #99
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Feature Request
Description
Currently, Commandler requires all parameters of Commands be populated, this could be with user input, or through default values.
We should allow omitting a parameter with no default value by making it
Optional<?>.This will allow commands to explicitly state that a parameter isn't required, and doesn't need a default value.
Motivation
We originally didn't allow for null as there is little to no reason to have a command with a
nullparameter,so considered null to be a case that shouldn't be considered. However, it appears there may be times an
Optional<?>could be useful, namely when the desired default value might take a complex Java Expressionto produce, or isn't portable between all integrations the command may be intended for.
Interface