public class Util extends java.lang.Object
There are different groups of methods in this class:
print methods - convenience methods for System.out.print etc. that additionally make sure output is gets flushed immediately.
string methods
string/vector converter methods
miscellaneous methods
Some basic but none the less the most used methods by myself are:
- isEmpty
- stringToLines
- sleep
| Modifier and Type | Field and Description |
|---|---|
static java.lang.Object |
CONSTANT_OBJECT |
| Modifier | Constructor and Description |
|---|---|
private |
Util()
This is an utility class, there is (should be) no need
for an instance of this class.
|
| Modifier and Type | Method and Description |
|---|---|
static boolean |
isEmpty(java.lang.String sTest_)
Tests, if a given String equals null or "".
|
(package private) static void |
panicIf(boolean bPanic_)
panicIf <=> not assert.
|
(package private) static void |
panicIf(boolean bPanic_,
java.lang.String sMessage_)
panicIf <=> not assert.
|
private static void |
sleep(int seconds_)
Current thread sleeps in seconds.
|
private static java.util.Vector |
stringToLines(int lines_,
java.lang.String pString_,
char cCutter_)
This function takes a String and separates it into different
lines.
|
static java.util.Vector |
stringToLines(java.lang.String pString_)
This function takes a String and separates it into different
lines.
|
private static java.util.Vector |
stringToLines(java.lang.String pString_,
char cCutter_)
This function takes a String and separates it into different
lines.
|
public static final java.lang.Object CONSTANT_OBJECT
private Util()
static void panicIf(boolean bPanic_)
static void panicIf(boolean bPanic_, java.lang.String sMessage_)
sMessage_ - The error message for the Exception.public static boolean isEmpty(java.lang.String sTest_)
private static java.util.Vector stringToLines(int lines_, java.lang.String pString_, char cCutter_)
lines_ - The number of lines that should be extracted.
Zero if maximum number of lines is requested.cCutter_ - The character that separates pString_ into
different linesprivate static java.util.Vector stringToLines(java.lang.String pString_, char cCutter_)
cCutter_ - The character that separates pString_ into
different linespublic static java.util.Vector stringToLines(java.lang.String pString_)
private static void sleep(int seconds_)