| java.lang.Object org.griphyn.common.util.Boolean
Boolean | public class Boolean (Code) | | This class converts a boolean property specification (string) in various
representations into a booelan value. It is liberal in the representation
it accepts, but strict in what it produces.
author: Gaurang Mehta author: Karan Vahi author: Jens-S. Vöckler version: $Revision: 50 $ |
Field Summary | |
final public static String | FALSE The character representation of a false value. | final public static String | TRUE The character representation of a true value. |
Method Summary | |
public static boolean | parse(String rep) Converts a boolean string representation into a boolean value.
Representations may include non-negative integers, where only
0 means false . | public static boolean | parse(String rep, boolean deflt) Converts a boolean string representation into a boolean value.
Representations may include non-negative integers, where only
0 means false . | public static String | print(boolean val) Converts a boolean value into a strict representation of it. |
FALSE | final public static String FALSE(Code) | | The character representation of a false value.
|
TRUE | final public static String TRUE(Code) | | The character representation of a true value.
|
parse | public static boolean parse(String rep)(Code) | | Converts a boolean string representation into a boolean value.
Representations may include non-negative integers, where only
0 means false . Other valid string representations
of true include:
true
yes
on
Any other string representation is taken to mean false
Parameters: rep - is the input string representing a boolean value. a boolean value from the representation. |
parse | public static boolean parse(String rep, boolean deflt)(Code) | | Converts a boolean string representation into a boolean value.
Representations may include non-negative integers, where only
0 means false . Other valid string representations
of true include:
true
yes
on
Other valid string representations of false include,
besides the numerical zero:
false
no
off
Any other string representation is taken to mean the boolean value
indicated by the paramater deflt.
Parameters: rep - is the input string representing a boolean value. Parameters: deflt - is the deflt value to use in case rep does notrepresent a valid boolean value. a boolean value from the representation. |
print | public static String print(boolean val)(Code) | | Converts a boolean value into a strict representation of it.
Parameters: val - is the boolean input value a string representing the boolean value. |
|
|