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

public Class MultipleChoiceInputRequest

extends InputRequest
Class Inheritance
Imports
java.util.Collection, .LinkedHashSet, .Vector

Encapsulates an input request.
Since
Ant 1.5

Field Summary

Modifier and TypeField and Description
private final LinkedHashSet<String>

Constructor Summary

AccessConstructor and Description
public
MultipleChoiceInputRequest(String
The prompt to show to the user. Must not be null.
prompt
,
Vector<String>
holds all input values that are allowed. Must not be null.
choices
)

public
MultipleChoiceInputRequest(String
The prompt to show to the user. Must not be null.
prompt
,
Collection<String>
holds all input values that are allowed. Must not be null.
choices
)

Method Summary

Modifier and TypeMethod and Description
public Vector<String>

Returns:

The possible values.
getChoices
()

public boolean

Returns:

true if the input is one of the allowed values.
isInputValid
()

Overrides org.apache.tools.ant.input.InputRequest.isInputValid.

Is the user input valid?
Inherited from org.apache.tools.ant.input.InputRequest:
getDefaultValuegetInputgetPromptsetDefaultValuesetInput

Field Detail

choicesback to summary
private final LinkedHashSet<String> choices

Constructor Detail

MultipleChoiceInputRequestback to summary
public MultipleChoiceInputRequest(String prompt, Vector<String> choices)
Parameters
prompt:String

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

choices:Vector<String>

holds all input values that are allowed. Must not be null.

Annotations
@Deprecated
MultipleChoiceInputRequestback to summary
public MultipleChoiceInputRequest(String prompt, Collection<String> choices)
Parameters
prompt:String

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

choices:Collection<String>

holds all input values that are allowed. Must not be null.

Method Detail

getChoicesback to summary
public Vector<String> getChoices()
Returns:Vector<String>

The possible values.

isInputValidback to summary
public boolean isInputValid()

Overrides org.apache.tools.ant.input.InputRequest.isInputValid.

Doc from org.apache.tools.ant.input.InputRequest.isInputValid.

Is the user input valid?

Returns:boolean

true if the input is one of the allowed values.

Annotations
@Override