| java.lang.Object java.lang.Boolean
Field Summary | |
final public static Boolean | FALSE The instance of the receiver which represents falsehood. | final public static Boolean | TRUE The instance of the receiver which represents truth. | final public static Class<Boolean> | TYPE The
java.lang.Class that represents this class. |
Constructor Summary | |
public | Boolean(String string) Constructs a new instance of this class given a string. | public | Boolean(boolean value) Constructs a new instance of this class given true or false. |
Method Summary | |
public boolean | booleanValue() Answers true if the receiver represents true and false if the receiver
represents false. | public int | compareTo(Boolean that) Compares this Boolean to another Boolean .
If this instance has the same value as the instance passed, then
0 is returned. | public boolean | equals(Object o) Compares the argument to the receiver, and answers true if they represent
the same object using a class specific comparison.
In this case, the argument must also be a Boolean, and the receiver and
argument must represent the same boolean value (i.e. | public static boolean | getBoolean(String string) Answers true if the system property described by the argument equal to
"true" using case insensitive comparison, and false otherwise.
Parameters: string - The name of the desired boolean. | public int | hashCode() Answers an integer hash code for the receiver. | public static boolean | parseBoolean(String s) Parses the string as a boolean . | public String | toString() Answers a string containing a concise, human-readable description of the
receiver. | public static String | toString(boolean value) Converts the specified boolean to its string representation. | public static Boolean | valueOf(String string) Answers a Boolean representing true if the argument is equal to "true"
using case insensitive comparison, and a Boolean representing false
otherwise.
Parameters: string - The name of the desired boolean. | public static Boolean | valueOf(boolean b) Answers Boolean.TRUE if the argument is equal to "true" using case
insensitive comparison, and Boolean.FALSE representing false otherwise.
Parameters: b - the boolean value. |
FALSE | final public static Boolean FALSE(Code) | | The instance of the receiver which represents falsehood.
|
TRUE | final public static Boolean TRUE(Code) | | The instance of the receiver which represents truth.
|
Boolean | public Boolean(String string)(Code) | | Constructs a new instance of this class given a string. If the string is
equal to "true" using a non-case sensitive comparison, the result will be
a Boolean representing true, otherwise it will be a Boolean representing
false.
Parameters: string - The name of the desired boolean. |
Boolean | public Boolean(boolean value)(Code) | | Constructs a new instance of this class given true or false.
Parameters: value - true or false. |
booleanValue | public boolean booleanValue()(Code) | | Answers true if the receiver represents true and false if the receiver
represents false.
true or false. |
compareTo | public int compareTo(Boolean that)(Code) | | Compares this Boolean to another Boolean .
If this instance has the same value as the instance passed, then
0 is returned. If this instance is true and
the instance passed is false , then a positive value is
returned. If this instance is false and the instance
passed is true , then a negative value is returned.
Parameters: that - The instance to compare to. throws: NullPointerException - if that is null . since: 1.5 See Also: java.lang.Comparable |
equals | public boolean equals(Object o)(Code) | | Compares the argument to the receiver, and answers true if they represent
the same object using a class specific comparison.
In this case, the argument must also be a Boolean, and the receiver and
argument must represent the same boolean value (i.e. both true or both
false).
Parameters: o - the object to compare with this object true if the object is the same as this objectfalse if it is different from this object See Also: Boolean.hashCode |
getBoolean | public static boolean getBoolean(String string)(Code) | | Answers true if the system property described by the argument equal to
"true" using case insensitive comparison, and false otherwise.
Parameters: string - The name of the desired boolean. The boolean value. |
hashCode | public int hashCode()(Code) | | Answers an integer hash code for the receiver. Any two objects which
answer true when passed to equals must
answer the same value for this method.
the receiver's hash See Also: Boolean.equals |
parseBoolean | public static boolean parseBoolean(String s)(Code) | | Parses the string as a boolean . If the string is not
null and is equal to "true" , regardless
case, then true is returned, otherwise false .
Parameters: s - The string to parse. A boolean value. since: 1.5 |
toString | public String toString()(Code) | | Answers a string containing a concise, human-readable description of the
receiver.
a printable representation for the receiver. |
toString | public static String toString(boolean value)(Code) | | Converts the specified boolean to its string representation. When the
boolean is true answer "true" , otherwise answer
"false" .
Parameters: value - the boolean the boolean converted to a string |
valueOf | public static Boolean valueOf(String string)(Code) | | Answers a Boolean representing true if the argument is equal to "true"
using case insensitive comparison, and a Boolean representing false
otherwise.
Parameters: string - The name of the desired boolean. the boolean value. |
valueOf | public static Boolean valueOf(boolean b)(Code) | | Answers Boolean.TRUE if the argument is equal to "true" using case
insensitive comparison, and Boolean.FALSE representing false otherwise.
Parameters: b - the boolean value. Boolean.TRUE or Boolean.FALSE Global true/false objects. |
|
|