public interface UserInput
Modifier and Type | Method and Description |
---|---|
java.lang.String |
prompt(java.lang.String prompt,
java.lang.String defaultValue,
boolean echo)
Display a prompt text to the user and expect them to enter a free-form value.
|
java.lang.String |
promptWithOptions(java.lang.String prompt,
java.lang.String defaultValue,
java.lang.String... options)
Display a prompt text to the user and expect one of
options in return. |
java.lang.String promptWithOptions(java.lang.String prompt, java.lang.String defaultValue, java.lang.String... options)
options
in return.prompt
- the a message to prompt the user withdefaultValue
- the default value to be returned if the user simply presses Enteroptions
- valid input option setjava.lang.String prompt(java.lang.String prompt, java.lang.String defaultValue, boolean echo)
prompt
- the a message to prompt the user withdefaultValue
- the default value to be returned if the user simply presses Enterecho
- echo the input to output (set to false for sensitive input, e.g. passwords)