public class InputSelection<E> extends Object
{message}: [c=command, o=overview]
1 {line 1}
2 {line 2}
3 {line 3}
Your choice (1..N or c,o):
If extra messages are needed, they will be printed *below* the 'Your choice'
line with a LinePrinter connected back to this.| Modifier and Type | Class and Description |
|---|---|
static interface |
InputSelection.Action<E>
The command action interface.
|
static class |
InputSelection.Command<E>
Command.
|
static interface |
InputSelection.EntryPrinter<E>
Interface for the entry printer.
|
static class |
InputSelection.Reaction
Command reaction enum.
|
| Constructor and Description |
|---|
InputSelection(Terminal terminal,
String prompt,
List<E> entries,
List<InputSelection.Command<E>> commands,
InputSelection.EntryPrinter<E> printer)
Create a selection instance.
|
InputSelection(Terminal terminal,
String prompt,
List<E> entries,
List<InputSelection.Command<E>> commands,
InputSelection.EntryPrinter<E> printer,
int pageSize,
int pageMargin,
int lineWidth)
Create a selection instance.
|
public InputSelection(Terminal terminal, String prompt, List<E> entries, List<InputSelection.Command<E>> commands, InputSelection.EntryPrinter<E> printer)
terminal - The terminal to print to.prompt - The prompt to introduce the selection with.entries - The list of entries.commands - The list of commands.printer - The entry printer.public InputSelection(Terminal terminal, String prompt, List<E> entries, List<InputSelection.Command<E>> commands, InputSelection.EntryPrinter<E> printer, int pageSize, int pageMargin, int lineWidth)
terminal - The terminal to print to.prompt - The prompt to introduce the selection with.entries - The list of entries.commands - The list of commands.printer - The entry printer.pageSize - The max number of entries per page.pageMargin - The number of entries above page size needed to trigger paging.lineWidth - The number of columns to print on.Copyright © 2016. All rights reserved.