public class UIPromptImpl extends Object implements UIPrompt
Constructor and Description |
---|
UIPromptImpl(Map<String,String> promptResults) |
Modifier and Type | Method and Description |
---|---|
String |
prompt(String message)
Prompt for user input, first printing the given line, then return user input as a String.
|
boolean |
promptBoolean(String message)
Prompt for boolean user input (Y/n), first printing the given message, then returning user input as a boolean.
|
boolean |
promptBoolean(String message,
boolean defaultValue)
Prompt for boolean user input, first printing the given message, then returning user input as a boolean.
|
String |
promptSecret(String message)
First print the given message, prompt the user for input (masking keystrokes for secrecy,) then return user input.
|
public String prompt(String message)
UIPrompt
public String promptSecret(String message)
UIPrompt
promptSecret
in interface UIPrompt
public boolean promptBoolean(String message)
UIPrompt
true
if an empty or whitespace-only user input is read.promptBoolean
in interface UIPrompt
public boolean promptBoolean(String message, boolean defaultValue)
UIPrompt
defaultValue
if an empty or whitespace-only user input is read.promptBoolean
in interface UIPrompt
Copyright © 2014 JBoss by Red Hat. All rights reserved.