|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjgroup.util.Util
public final class Util
The Util
class implements various useful static methods
that can be invoked from anywhere.
Method Summary | |
---|---|
static java.lang.String |
byte2str(byte value)
Converts the given byte value to a string value
aligned to three characters; it can be used to make message
outputs print nicely. |
static java.lang.String |
getDateString()
Return a stringified date value. |
static java.lang.String |
getDateTimeString()
Return a stringified date and clock time value. |
static java.lang.String |
getTimeString()
Return a stringified clock time value. |
static boolean |
in(java.lang.Object[] array,
java.lang.Object obj)
Return true if an object equal to obj is contained in
array . |
static int |
referenceAt(java.lang.Object[] array,
java.lang.Object key)
|
static void |
sleep(long time)
Wrapper for the Thread.sleep() method. |
static int |
valueAt(int[] array,
int key)
Searches the specified array of ints for the specified value using the sequential search algorithm. |
static int |
valueAt(java.lang.Object[] array,
java.lang.Object key)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static int valueAt(int[] array, int key)
array
- the array to be searched.key
- the value to be searched for.
public static int valueAt(java.lang.Object[] array, java.lang.Object key)
public static int referenceAt(java.lang.Object[] array, java.lang.Object key)
public static boolean in(java.lang.Object[] array, java.lang.Object obj)
obj
is contained in
array
.
public static java.lang.String getDateString()
yyyymmdd
public static java.lang.String getTimeString()
hhmmss
public static java.lang.String getDateTimeString()
yyyymmdd-hhmm
public static java.lang.String byte2str(byte value)
byte
value to a string value
aligned to three characters; it can be used to make message
outputs print nicely.
public static void sleep(long time)
Thread.sleep()
method.
time
- the time in milliseconds to sleep.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |