org.springframework.cloud.dataflow.shell.command

## Interface UserInput

- All Known Implementing Classes:
    ConsoleUserInput

      public interface UserInput

  Abstraction for a mechanism used to get user interactive user input.
  Author:
    Eric Bottard, Marius Bogoevici

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `prompt(String prompt, String defaultValue, boolean echo)` Display a prompt text to the user and expect them to enter a free-form value.
    `String` | `promptWithOptions(String prompt, String defaultValue, String... options)` Display a prompt text to the user and expect one of `options` in return.

- - ### Method Detail

    - #### promptWithOptions

          String promptWithOptions(String prompt,
                                   String defaultValue,
                                   String... options)

      Display a prompt text to the user and expect one of `options` in return.
      Parameters:
        `prompt` - the a message to prompt the user with
        `defaultValue` - the default value to be returned if the user simply presses Enter
        `options` - valid input option set
      Returns:
        the prompt text to display to the user

    - #### prompt

          String prompt(String prompt,
                        String defaultValue,
                        boolean echo)

      Display a prompt text to the user and expect them to enter a free-form value. Optionally, the input is echoed.
      Parameters:
        `prompt` - the a message to prompt the user with
        `defaultValue` - the default value to be returned if the user simply presses Enter
        `echo` - echo the input to output (set to false for sensitive input, e.g. passwords)
      Returns:
        the prompt text to display to the user

Copyright © 2021 Pivotal Software, Inc.. All rights reserved.