org.apache.tools.ant.input

Class MultipleChoiceInputRequest


public class MultipleChoiceInputRequest
extends InputRequest

Encapsulates an input request.

Version:
$Revision: 1.3.2.4 $

Since:
Ant 1.5

Constructor Summary

MultipleChoiceInputRequest(String prompt, Vector choices)

Method Summary

Vector
getChoices()
boolean
isInputValid()

Methods inherited from class org.apache.tools.ant.input.InputRequest

getInput, getPrompt, isInputValid, setInput

Constructor Details

MultipleChoiceInputRequest

public MultipleChoiceInputRequest(String prompt,
                                  Vector choices)

Parameters:
prompt - The prompt to show to the user. Must not be null.
choices - holds all input values that are allowed. Must not be null.

Method Details

getChoices

public Vector getChoices()

Returns:
The possible values.


isInputValid

public boolean isInputValid()
Overrides:
isInputValid in interface InputRequest

Returns:
true if the input is one of the allowed values.


Copyright B) 2000-2005 Apache Software Foundation. All Rights Reserved.