Top Description Fields Constructors Methods
org.apache.tools.ant.input

public Class InputRequest

extends Object
Class Inheritance
Known Direct Subclasses
org.apache.tools.ant.input.MultipleChoiceInputRequest

Encapsulates an input request.
Since
Ant 1.5

Field Summary

Modifier and TypeField and Description
private String
private String
private final String

Constructor Summary

AccessConstructor and Description
public
InputRequest(String
The prompt to show to the user. Must not be null.
prompt
)

Construct an InputRequest.

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

the default value.
getDefaultValue
()

Gets a configured default value.

public String

Returns:

the user input.
getInput
()

Retrieves the user input.

public String

Returns:

the prompt.
getPrompt
()

Retrieves the prompt text.

public boolean

Returns:

true if it is.
isInputValid
()

Is the user input valid?

public void
setDefaultValue(String
the value to set.
d
)

Configures a default value.

public void
setInput(String
the string to be used for input.
input
)

Sets the user provided input.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

defaultValueback to summary
private String defaultValue
inputback to summary
private String input
promptback to summary
private final String prompt

Constructor Detail

InputRequestback to summary
public InputRequest(String prompt)

Construct an InputRequest.

Parameters
prompt:String

The prompt to show to the user. Must not be null.

Method Detail

getDefaultValueback to summary
public String getDefaultValue()

Gets a configured default value.

Returns:String

the default value.

Since
Ant 1.7.0
getInputback to summary
public String getInput()

Retrieves the user input.

Returns:String

the user input.

getPromptback to summary
public String getPrompt()

Retrieves the prompt text.

Returns:String

the prompt.

isInputValidback to summary
public boolean isInputValid()

Is the user input valid?

Returns:boolean

true if it is.

setDefaultValueback to summary
public void setDefaultValue(String d)

Configures a default value.

Parameters
d:String

the value to set.

Since
Ant 1.7.0
setInputback to summary
public void setInput(String input)

Sets the user provided input.

Parameters
input:String

the string to be used for input.