|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sage.orion.sdata.servlet.XMLBoolean
public final class XMLBoolean
A utility class for translating booleans to and from XML
Constructor Summary | |
---|---|
XMLBoolean()
|
Method Summary | |
---|---|
static java.lang.String |
of(boolean value)
returns the String representation of the boolean value |
static boolean |
of(java.lang.String value)
returns the boolean representation of the String value |
static boolean |
of(java.lang.String value,
boolean defaultValue)
returns the boolean representation of the String value, or the default if the string is null or empty. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XMLBoolean()
Method Detail |
---|
public static final java.lang.String of(boolean value)
value
- the value to be translated
public static final boolean of(java.lang.String value)
Unlike the of(String, boolean)
version this version regards an
empty string as false.
value
- the value to be translated. This must not be null. If this value
might be null use of(String, boolean)
. The value is
used untrimmed; remember to trim the String if it might contain
leading or trailing spaces.
public static final boolean of(java.lang.String value, boolean defaultValue)
The value is regarded as empty if it contains no characters. The value is not trimmed in any way.
value
- the value to be translated. This may be a null reference. in
which case the default will be returned.defaultValue
- the default value to return if the value is null or empty
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |