|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.universaldevices.common.UDUtil
public class UDUtil
Method Summary | |
---|---|
static int |
compare(java.lang.Comparable a,
java.lang.Comparable b)
Compare two objects both of which may be null |
static java.lang.String |
encodeXmlText(java.lang.String str,
boolean fromHtml)
Translate special characters from XML |
static java.lang.String |
fromXmlText(java.lang.String str)
Translate special characters from XML (e.g. |
static int[] |
getInts(java.lang.String str,
java.lang.String sep,
int base,
int defVal)
Return an array of integers given a delimited string (e.g. |
static boolean |
isEqual(java.lang.Object a,
java.lang.Object b)
Compare two objects both of which may be null |
static int |
parseInteger(int base,
java.lang.String data)
Convert a string to an integer. |
static int |
parseInteger(int base,
java.lang.String data,
int defaultValue)
Convert a string to an integer, allowing for 0x prefix for hexadecimal values. |
static int |
parseInteger(java.lang.String data)
Convert a string to an integer, allowing for 0x prefix for hexadecimal values. |
static java.lang.Integer |
parseInteger(java.lang.String data,
java.lang.Integer defaultValue)
Convert a string to an integer, allowing for 0x prefix for hexadecimal values. |
static void |
showError(int status,
java.lang.String message)
|
static boolean |
sleep(int millis)
Sleep specified number of milliseconds. |
static java.lang.String |
toHex(int v)
|
static java.lang.String |
toHex(int v,
int minLen)
|
static java.lang.String |
toXmlText(java.lang.String str)
Translate special characters to XML (e.g. |
static boolean |
validateNodeName(java.lang.String newName)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static int[] getInts(java.lang.String str, java.lang.String sep, int base, int defVal)
str
- String to parsesep
- Separatorbase
- The base (e.g. 10 for decimal, 16 for hex, etc.)defVal
- Default value if number cannot be parsed
public static boolean sleep(int millis)
millis
- Milliseconds to sleep
public static java.lang.String toXmlText(java.lang.String str)
str
- String to translate
public static java.lang.String fromXmlText(java.lang.String str)
str
- String to translate
public static java.lang.String encodeXmlText(java.lang.String str, boolean fromHtml)
str
- String to translatefromHtml
- True the convert from XML to chars, False convert from chars to XML
public static java.lang.Integer parseInteger(java.lang.String data, java.lang.Integer defaultValue)
data
- The string representation of the integerdefaultValue
- The value to return if the string cannot be converted into an integer.
public static int parseInteger(java.lang.String data)
data
- The string representation of the integer
public static int parseInteger(int base, java.lang.String data, int defaultValue)
base
- The base (e.g. 10 for decimal, 16 for hex, etc.)data
- The string representation of the integerdefaultValue
- The value to return if the string cannot be converted into an integer.
public static int parseInteger(int base, java.lang.String data)
base
- The base (e.g. 10 for decimal, 16 for hex, etc.)data
- The string representation of the integer
public static boolean isEqual(java.lang.Object a, java.lang.Object b)
a
- Object 1b
- Object 2
public static int compare(java.lang.Comparable a, java.lang.Comparable b)
a
- Object 1b
- Object 2
public static java.lang.String toHex(int v)
public static java.lang.String toHex(int v, int minLen)
public static boolean validateNodeName(java.lang.String newName)
public static void showError(int status, java.lang.String message)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |