public class MessageGenerator
extends Object
Constructor and Description |
---|
MessageGenerator() |
Modifier and Type | Method and Description |
---|---|
static void |
agreeToContinue()
This will prompt the user to type y or n to either continue
with a process or to exit.
|
static void |
briefError(String msg)
Used as a general way to create an error message and send it to std.err.
|
static void |
briefMessage(String msg)
Used as a general way to create a message and send it to
std.out.
|
static String |
createStringFromArray(Object[] objs)
Creates a simple string from an array of objects.
|
static String |
formatString(String s1) |
static String |
formatString(String s,
boolean value) |
static String |
formatString(String s,
float value) |
static String |
formatString(String s,
int value) |
static String |
formatString(String s,
long value) |
static String |
formatString(String s,
short value) |
static void |
generalError(String msg)
Used as a general way to create an error message and send it to
std.err.
|
static void |
generalErrorAndExit(String msg)
Used as a general way to create an error message and send it to
std.err.
|
static void |
printHeader(String s)
Prints a generic header to standard out to separate operations.
|
static void |
promptToContinue()
This will prompt the user to type y or n to either continue
with a process or to exit.
|
static void |
waitOnAnyKey()
Prompts the user to press any key to continue execution.
|
static void |
waitOnAnyKeySilent()
Pauses execution until a key is pressed.
|
public static void generalErrorAndExit(String msg)
msg
- The message to print to standard errorpublic static void generalError(String msg)
msg
- The message to print to standard errorpublic static void briefError(String msg)
msg
- The message to print to standard errorpublic static void briefMessage(String msg)
msg
- The message to print to standard outpublic static void waitOnAnyKey()
public static void waitOnAnyKeySilent()
public static String createStringFromArray(Object[] objs)
objs
- The object to create a string from.public static void printHeader(String s)
s
- public static void promptToContinue()
public static void agreeToContinue()
public static String formatString(String s1)
public static String formatString(String s, float value)
public static String formatString(String s, short value)
public static String formatString(String s, boolean value)
public static String formatString(String s, int value)
public static String formatString(String s, long value)