|
The Robot Application Programming Interface Delegate Project
|
|
String conversion utilities for base types and arrays of base types. More...
Static Public Member Functions | |
| static boolean | toBoolean (String str) |
| static int | toInt (String str) |
| static short | toShort (String str) |
| static float | toFloat (String str) |
| static double | toDouble (String str) |
| static int[] | toIntArray (String str, String delim) |
| static short[] | toShortArray (String str) |
| static short[] | toShortArray (String str, String delim) |
| static int[] | toIntArray (String str) |
| static float[] | toFloatArray (String str, String delim) |
| static float[] | toFloatArray (String str) |
| static double[] | toDoubleArray (String str, String delim) |
| static double[] | toDoubleArray (String str) |
| static double[] | toDoubleArray (List< String > input) |
| static boolean | setField (Object obj, java.lang.reflect.Field field, String str) |
| Set a field from a string without knowing what type it is beforehand. | |
| static String | arrayToString (Object array) |
| static String | arrayToString (Object array, String sep) |
| static String | arrayToString (Object array, String sep, String beg, String end) |
| convert an array/collection/hashtable to a printable string | |
| static String | upperFirstChar (String string, boolean lowerTheRest) |
| Take a string. | |
| static String | lowerFirstChar (String string, boolean lowerTheRest) |
| Take a string. | |
| static String | toSingleString (List< String > list, String separator) |
| Convert a list to a single string separated by the given separator. | |
| static List< String > | fromSingleString (String string, String separator) |
| Return a List full of strings extracted from the given string separated by the given separator. | |
| static String | trimEndQuotes (String string) |
| Removes "" from around a string. | |
| static String | trimEndCurlies (String string) |
| Removes "" from around a string. | |
| static String | cleanPath (String path) |
| static String | basename (String filepath) |
| removes path elements and everything following the last "." from filepath horribly inefficient, but not used very often | |
| static String | stackTrace (Throwable t) |
| static String | getClasspathAsDirectoryName (Class myclass) |
| Given a class, get it's package as a directory, eg: | |
| static String | insertNewlines (String s, int width) |
| Take a string that may be very long and insert newlines at the space closest to the width given. | |
| static int | computeNumberOfLines (String s, int width) |
| static String | getExtension (File file) |
| Return the extension if any of a file not including the dot. | |
| static int | getAscii (char c) |
| Get the ascii number for a character. | |
| static char[] | getCharFromAscii (int ascii) |
| Get a char array by converting the number. | |
Static Public Attributes | |
| static final String | DELIMITERS = ", \t\n\r\f" |
| our default delimiter set includes comma in addition to the standard Java whitespace delimiter set | |
| static String | SEPARATOR = "/" |
| static String arrayToString | ( | Object | array | ) | [static] |
| static String arrayToString | ( | Object | array, |
| String | sep | ||
| ) | [static] |

| static String arrayToString | ( | Object | array, |
| String | sep, | ||
| String | beg, | ||
| String | end | ||
| ) | [static] |
| array | |
| beg | string to begin array (e.g. "[") |
| end | string to end array (e.g. "]") |
| sep | separator (e.g. " " or "\t", ", ", etc) |
| static String basename | ( | String | filepath | ) | [static] |

| static String cleanPath | ( | String | path | ) | [static] |
| static int computeNumberOfLines | ( | String | s, |
| int | width | ||
| ) | [static] |
| static List<String> fromSingleString | ( | String | string, |
| String | separator | ||
| ) | [static] |
| string | |
| separator |
| static int getAscii | ( | char | c | ) | [static] |
| c |
| static char [] getCharFromAscii | ( | int | ascii | ) | [static] |
| ascii |
| static String getClasspathAsDirectoryName | ( | Class | myclass | ) | [static] |
| static String getExtension | ( | File | file | ) | [static] |
If there is no extension return the filename if file is null return empty string
| file |
| static String insertNewlines | ( | String | s, |
| int | width | ||
| ) | [static] |
ie turn the above into something like: Take a string that may be very long and insert newlines at the space closest to the width given.
| s | |
| width |
| static String lowerFirstChar | ( | String | string, |
| boolean | lowerTheRest | ||
| ) | [static] |
Return a string that has the first character lowercase. eg First becomes first eg FIRST becomes fIRST
| string | |
| lowerTheRest | ie camelCase vs camelcase |
| static boolean setField | ( | Object | obj, |
| java.lang.reflect.Field | field, | ||
| String | str | ||
| ) | [static] |
| obj | object owning field |
| field | field to be set (must be base type or array of base type) |
| str | string value of field to be set |

| static String stackTrace | ( | Throwable | t | ) | [static] |
| static boolean toBoolean | ( | String | str | ) | [static] |
| static double toDouble | ( | String | str | ) | [static] |
| static double [] toDoubleArray | ( | String | str | ) | [static] |
| static double [] toDoubleArray | ( | String | str, |
| String | delim | ||
| ) | [static] |

| static double [] toDoubleArray | ( | List< String > | input | ) | [static] |

| static float toFloat | ( | String | str | ) | [static] |
| static float [] toFloatArray | ( | String | str, |
| String | delim | ||
| ) | [static] |

| static float [] toFloatArray | ( | String | str | ) | [static] |
| static int toInt | ( | String | str | ) | [static] |
| static int [] toIntArray | ( | String | str | ) | [static] |
| static int [] toIntArray | ( | String | str, |
| String | delim | ||
| ) | [static] |

| static short toShort | ( | String | str | ) | [static] |
| static short [] toShortArray | ( | String | str | ) | [static] |
| static short [] toShortArray | ( | String | str, |
| String | delim | ||
| ) | [static] |

| static String toSingleString | ( | List< String > | list, |
| String | separator | ||
| ) | [static] |
| list | |
| separator |
| static String trimEndCurlies | ( | String | string | ) | [static] |
given "henry" returns henry
| string |
| static String trimEndQuotes | ( | String | string | ) | [static] |
given "henry" returns henry
| string |
| static String upperFirstChar | ( | String | string, |
| boolean | lowerTheRest | ||
| ) | [static] |
Return a string that has the first character uppercase. eg first becomes First eg FIRST becomes First
| string | |
| lowerTheRest | to lowercase the rest of the word, ie Camelcase vs CamelCase |
final String DELIMITERS = ", \t\n\r\f" [static] |
String SEPARATOR = "/" [static] |