Package ch.autumo.commons.configuration
Class YesOrNo
java.lang.Object
ch.autumo.commons.configuration.YesOrNo
- All Implemented Interfaces:
Comparable<YesOrNo>
YesOrNo; another Boolean using the string values 'yes' or 'no'.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
YES
TheYesOrNoobject corresponding to the primitive valuetrue. -
NO
TheYesOrNoobject corresponding to the primitive valuefalse.
-
-
Constructor Details
-
YesOrNo
public YesOrNo(boolean value) Yes or No?- Parameters:
value- value
-
-
Method Details
-
parseBoolean
Parse boolean.- Parameters:
s- string- Returns:
- true if 'yes/Yes'
-
booleanValue
public boolean booleanValue()Get boolean value.- Returns:
- boolean value
-
valueOf
Value of string.- Parameters:
s- string 'yes' or 'no'- Returns:
- yes or no object
-
toString
-
hashCode
public int hashCode() -
compareTo
- Specified by:
compareToin interfaceComparable<YesOrNo>
-
compare
public static int compare(boolean a, boolean b) Compare values.- Parameters:
a- value 1b- value 2- Returns:
- compare value
-
toString
To string.- Parameters:
b- boolean value- Returns:
- string representation
-