public abstract class Tools extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
delay(int ms)
Suspends the current thread for a specified number of millis.
|
static long |
fromHex(String string)
Converts a string from hex to long.
|
static ThreadFactory |
minPriority(ThreadFactory factory)
Returns a thread factory that produces threads with MIN_PRIORITY.
|
static ThreadFactory |
namedThreads(String pattern)
Returns a thread factory that produces threads named according to the
supplied name pattern.
|
static List<String> |
slurp(File path)
Slurps the contents of a file into a list of strings, one per line.
|
static String |
toHex(long value)
Converts a long value to hex string; 16 wide and sans 0x.
|
static String |
toHex(long value,
int width)
Converts a long value to hex string; 16 wide and sans 0x.
|
public static ThreadFactory namedThreads(String pattern)
pattern - name patternpublic static ThreadFactory minPriority(ThreadFactory factory)
factory - backing ThreadFactorypublic static long fromHex(String string)
string - hex number in string form; sans 0xpublic static String toHex(long value)
value - long valuepublic static String toHex(long value, int width)
value - long valuewidth - string width; zero paddedpublic static void delay(int ms)
ms - number of millisCopyright © 2014. All rights reserved.