public class InputRequest
extends java.lang.Object
Constructor and Description |
---|
InputRequest(java.lang.String prompt)
Construct an InputRequest.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getDefaultValue()
Gets a configured default value.
|
java.lang.String |
getInput()
Retrieves the user input.
|
java.lang.String |
getPrompt()
Retrieves the prompt text.
|
boolean |
isInputValid()
Is the user input valid?
|
void |
setDefaultValue(java.lang.String d)
Configures a default value.
|
void |
setInput(java.lang.String input)
Sets the user provided input.
|
public InputRequest(java.lang.String prompt)
prompt
- The prompt to show to the user. Must not be null.public java.lang.String getPrompt()
public void setInput(java.lang.String input)
input
- the string to be used for input.public boolean isInputValid()
public java.lang.String getInput()
public java.lang.String getDefaultValue()
public void setDefaultValue(java.lang.String d)
d
- the value to set.