|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.rapla.components.util.Tools
public abstract class Tools
miscellaneous util methods.
Field Summary | |
---|---|
static Object[] |
EMPTY_ARRAY
same as new Object[0]. |
static Class[] |
EMPTY_CLASS_ARRAY
|
static Iterator |
EMPTY_ITERATOR
|
static List |
EMPTY_LIST
an unmodifiable list with no elements. |
static Set |
EMPTY_SET
an unmodifiable set with no elements. |
static String[] |
EMPTY_STRING_ARRAY
|
Constructor Summary | |
---|---|
Tools()
|
Method Summary | |
---|---|
static String |
convert(byte[] bytes)
Convert a byte array into a printable format containing aString of hexadecimal digit characters (two per byte). |
static char |
convertDigit(int value)
Convert the specified value (0-15) to the corresponding hexadecimal digit. |
static String[][] |
csvRead(Reader reader,
int expectedColumns)
reads a table from a csv file. |
static boolean |
equalsOrBothNull(Object o1,
Object o2)
|
static boolean |
isKey(String key)
Rudimentary tests if the string is a valid xml-tag. |
static String |
left(String string,
int width)
same as substring(0,width-1) except that it will not not throw an ArrayIndexOutOfBoundsException if string.length()<width. |
static boolean |
match(char[] p1,
char[] p2)
test if 2 char arrays match. |
static String |
replaceAll(String string,
String stringToReplace,
String newString)
1.3 compatibility method |
static String[] |
split(String stringToSplit,
char delimiter)
1.3 compatibility method |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static Object[] EMPTY_ARRAY
public static Class[] EMPTY_CLASS_ARRAY
public static String[] EMPTY_STRING_ARRAY
public static Iterator EMPTY_ITERATOR
public static List EMPTY_LIST
public static Set EMPTY_SET
Constructor Detail |
---|
public Tools()
Method Detail |
---|
public static boolean match(char[] p1, char[] p2)
public static boolean isKey(String key)
public static String left(String string, int width)
ArrayIndexOutOfBoundsException
if string.length()<width.
public static String convert(byte[] bytes)
public static char convertDigit(int value)
public static boolean equalsOrBothNull(Object o1, Object o2)
public static String[] split(String stringToSplit, char delimiter)
public static String replaceAll(String string, String stringToReplace, String newString)
public static String[][] csvRead(Reader reader, int expectedColumns) throws IOException
IOException
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |