| java.lang.Object org.underworldlabs.util.MiscUtils
MiscUtils | public class MiscUtils (Code) | | author: Takis Diakoumis author: Dragan Vasic version: $Revision: 1.11 $ |
Method Summary | |
public static String | charsToString(char[] chars) | public static boolean | containsValue(String[] values, String value) | public static boolean | containsWholeWord(String value, String word) Tests if the specified value contains the specified
word as a WHOLE word. | public static String[] | findImplementingClasses(String interfaceName, String paths) | public static String[] | findImplementingClasses(String interfaceName, String paths, boolean interfaceOnly) | public static String | firstLetterToUpper(String value) | public static String | formatDuration(long value) | public static String | formatNumber(long number, String pattern) | public static String | formatSQLError(SQLException e) Formats the specified the SQL exception object
displaying the error message, error code and
the SQL state code. | public static boolean | getBooleanValue(String value) | public static String | getClassName(String path) | public static String | getExceptionName(Throwable e) | public static String | getImplementedClass(Class clazz, String implementation) | public static String[][] | getSystemProperties() Returns the system properties from System.getProperties()
as a 2 dimensional array of key/name. | public static byte[] | inputStreamToBytes(InputStream is) | public static boolean | isMinJavaVersion(int major, int minor) Returns whether the current version of the JVM is at least
that specified for major and minor version numbers. | public static boolean | isNull(String value) Checks if the specified value is null . | public static boolean | isValidNumber(String number) | public static String | keyStrokeToString(KeyStroke keyStroke) | public static URL[] | loadURLs(String paths) | public static void | printActionMap(JComponent component) | public static void | printActionMap(ActionMap actionMap, String who) | public static void | printInputMap(JComponent component) | public static void | printInputMap(InputMap inputMap, String heading) | public static void | printSystemProperties() Prints the system properties as [key: name]. | public static String[] | splitSeparatedValues(String csvString, String delim) Returns a String array of the the CSV value
specified with the specfied delimiter. |
ACTION_DELIMETER | final public static String ACTION_DELIMETER(Code) | | |
charsToString | public static String charsToString(char[] chars)(Code) | | |
containsWholeWord | public static boolean containsWholeWord(String value, String word)(Code) | | Tests if the specified value contains the specified
word as a WHOLE word.
Parameters: value - the value to test for the word Parameters: word - the whole word we are looking for true if found, false otherwise |
formatDuration | public static String formatDuration(long value)(Code) | | |
formatSQLError | public static String formatSQLError(SQLException e)(Code) | | Formats the specified the SQL exception object
displaying the error message, error code and
the SQL state code.
Parameters: e - - the SQL exception |
getBooleanValue | public static boolean getBooleanValue(String value)(Code) | | |
getSystemProperties | public static String[][] getSystemProperties()(Code) | | Returns the system properties from System.getProperties()
as a 2 dimensional array of key/name.
|
isMinJavaVersion | public static boolean isMinJavaVersion(int major, int minor)(Code) | | Returns whether the current version of the JVM is at least
that specified for major and minor version numbers. For example,
with a minium required of 1.4, the major version is 1 and minor is 4.
Parameters: major - - the major version Parameters: minor - - the minor version whether the system version is at least major.minor |
isNull | public static boolean isNull(String value)(Code) | | Checks if the specified value is null .
This will also return true if the length
of the specified value is zero.
Parameters: value - the value to check for null true | false |
isValidNumber | public static boolean isValidNumber(String number)(Code) | | |
printSystemProperties | public static void printSystemProperties()(Code) | | Prints the system properties as [key: name].
|
splitSeparatedValues | public static String[] splitSeparatedValues(String csvString, String delim)(Code) | | Returns a String array of the the CSV value
specified with the specfied delimiter.
Parameters: csvString - the CSV value Parameters: delim - the delimiter used in the CSV value an array of split values |
|
|