InputRequest (Apache Ant API)
Date: 2015-06-29

org.apache.tools.ant.input

## Class InputRequest

- java.lang.Object
- - org.apache.tools.ant.input.InputRequest

- Direct Known Subclasses:
    MultipleChoiceInputRequest

      public class InputRequest
      extends java.lang.Object

  Encapsulates an input request.
  Since:
    Ant 1.5

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `InputRequest(java.lang.String prompt)` Construct an InputRequest.

  - ### Method Summary

    Methods
    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.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### InputRequest

          public InputRequest(java.lang.String prompt)

      Construct an InputRequest.
      Parameters:
        `prompt` - The prompt to show to the user. Must not be null.

  - ### Method Detail

    - #### getPrompt

          public java.lang.String getPrompt()

      Retrieves the prompt text.
      Returns:
        the prompt.

    - #### setInput

          public void setInput(java.lang.String input)

      Sets the user provided input.
      Parameters:
        `input` - the string to be used for input.

    - #### isInputValid

          public boolean isInputValid()

      Is the user input valid?
      Returns:
        true if it is.

    - #### getInput

          public java.lang.String getInput()

      Retrieves the user input.
      Returns:
        the user input.

    - #### getDefaultValue

          public java.lang.String getDefaultValue()

      Gets a configured default value.
      Returns:
        the default value.
      Since:
        Ant 1.7.0

    - #### setDefaultValue

          public void setDefaultValue(java.lang.String d)

      Configures a default value.
      Parameters:
        `d` - the value to set.
      Since:
        Ant 1.7.0