|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ow2.petals.tools.webadmin.util.StringHelper
public final class StringHelper
Initial developer(s): Adrien LOUIS
Method Summary | |
---|---|
static boolean |
equal(java.lang.String a,
java.lang.String b)
Test the equality of the specified strings. test is : ( (a==b==null) || a.equals(b) ) |
static boolean |
equalIgnoreCase(java.lang.String a,
java.lang.String b)
Same as equal, with ignoreCase |
static java.lang.String |
extractValueForAttribute(java.lang.String string,
java.lang.String attribute,
java.lang.String separator)
TODO use Tokenizer Extract in the given String the value corresponding to the given attribute: "....... |
static java.lang.String |
formatExceptionMessage(java.lang.String exceptionMessage)
|
static java.lang.String |
HTMLEntityEncode(java.lang.String s)
Encode a String in HTML format |
static boolean |
isNotNullAndNotEmpty(java.lang.String s)
Return true if the String is not null and its size is > 0. |
static boolean |
isNullOrEmpty(java.lang.String s)
Return true if the String is null or its size is 0. |
static java.lang.String |
prettyPrint(org.w3c.dom.Document xmlDocument)
parse the xml String and return it pretty-printed (with correct indentations, etc..) |
static java.lang.String |
prettyPrint(java.lang.String xmlString)
parse the xml String and return it pretty-printed (with correct indentations, etc..) |
static java.util.List<java.lang.String> |
splitPathElements(java.lang.String path)
Split the given String path into String path elements. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static boolean equal(java.lang.String a, java.lang.String b)
a
- b
-
public static boolean equalIgnoreCase(java.lang.String a, java.lang.String b)
a
- b
-
public static java.lang.String extractValueForAttribute(java.lang.String string, java.lang.String attribute, java.lang.String separator)
string
- can be null or empty (return null)attribute
- can be null or empty (return null)separator
- (";"," ","&"...) can be null or empty. in this case, take the
end of the String : "ATT=public static java.lang.String formatExceptionMessage(java.lang.String exceptionMessage)
exceptionMessage
- usually e.getMessage()
public static java.lang.String HTMLEntityEncode(java.lang.String s)
s
- the String to encode
public static boolean isNotNullAndNotEmpty(java.lang.String s)
s
-
public static boolean isNullOrEmpty(java.lang.String s)
s
-
public static java.lang.String prettyPrint(org.w3c.dom.Document xmlDocument)
xmlString
- the xml String to pretty printpublic static java.lang.String prettyPrint(java.lang.String xmlString)
xmlString
- the xml String to pretty print
public static java.util.List<java.lang.String> splitPathElements(java.lang.String path)
path
- the String path to split, can be null or empty (return an
empty ArrayList)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |