public abstract class ConsoleMenu extends Object
| Constructor and Description |
|---|
ConsoleMenu() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
add(ConsoleMenuItem menuItem) |
protected abstract void |
addMenuItems()
Enlists the
H2HConsoleMenuItems of this menu. |
static boolean |
awaitBooleanParameter() |
static int |
awaitIntParameter() |
static String |
awaitStringParameter() |
protected void |
createItems()
Specifies the
H2HConsoleMenuItems of this menu. |
protected void |
exit() |
protected String |
getExitItemText() |
protected abstract String |
getInstruction() |
protected void |
onMenuExit() |
void |
open() |
static void |
print() |
static void |
print(String message) |
static void |
printError(String errorMsg) |
static void |
printError(Throwable error) |
protected void createItems()
H2HConsoleMenuItems of this menu.H2HConsoleMenuItems are specified here, as they might also be specified
in-line in addMenuItems().H2HConsoleMenuItems with preconditions should be specified by this method.protected abstract void addMenuItems()
H2HConsoleMenuItems of this menu.protected String getExitItemText()
protected final void add(ConsoleMenuItem menuItem)
public final void open()
public static String awaitStringParameter()
public static int awaitIntParameter()
public static boolean awaitBooleanParameter()
public static void print()
public static void print(String message)
public static void printError(Throwable error)
public static void printError(String errorMsg)
protected void exit()
protected void onMenuExit()
protected abstract String getInstruction()
Copyright © 2019. All rights reserved.