java.lang
Class Boolean
java.lang.Object
|
+--java.lang.Boolean
All Implemented Interfaces:
Serializable
Instances of class Boolean represent primitive
boolean values.
Since:Authors:- Paul Fisher
- Eric Blake <ebb9@email.byu.edu>
FALSE
public static final Boolean FALSE This field is a Boolean object representing the
primitive value false. This instance is returned
by the static valueOf() methods if they return
a Boolean representing false.
TRUE
public static final Boolean TRUE This field is a Boolean object representing the
primitive value true. This instance is returned
by the static valueOf() methods if they return
a Boolean representing true.
TYPE
public static final Class TYPE The primitive type boolean is represented by this
Class object.
Since:
Boolean
public Boolean(boolean value) Create a Boolean object representing the value of the
argument value. In general the use of the static
method valueof(boolean) is more efficient since it will
not create a new object.
Parameters:
See Also:
Boolean
public Boolean(java.lang.String s) Creates a Boolean object representing the primitive
true if and only if s matches
the string "true" ignoring case, otherwise the object will represent
the primitive false. In general the use of the static
method valueof(String) is more efficient since it will
not create a new object.
Parameters:
booleanValue
public boolean booleanValue() Return the primitive boolean value of this
Boolean object.
Returns:
- true or false, depending on the value of this Boolean
equals
public boolean equals(java.lang.Object obj) If the obj is an instance of Boolean and
has the same primitive value as this object then true
is returned. In all other cases, including if the obj
is null, false is returned.
Parameters:
Returns:
getBoolean
public static boolean getBoolean(java.lang.String name) If the value of the system property name matches
"true" ignoring case then the function returns true.
Parameters:
Returns:
- true if the property resulted in "true"
Throws:
See Also:
hashCode
public int hashCode() Returns the integer 1231 if this object represents
the primitive true and the integer 1237
otherwise.
Returns:
toString
public String toString() Returns "true" if the value of this object is true and
returns "false" if the value of this object is false.
Returns:
- the string representation of this
toString
public static String toString(boolean b) Returns "true" if the value of the give boolean is true and
returns "false" if the value of the given boolean is false.
Since:Parameters:
Returns:
- the string representation of the boolean
valueOf
public static Boolean valueOf(boolean b) Returns the Boolean TRUE if the given boolean is
true, otherwise it will return the Boolean
FALSE.
Since:Parameters:
Returns:
See Also:
valueOf
public static Boolean valueOf(java.lang.String s) Returns the Boolean TRUE if and only if the given
String is equal, ignoring case, to the the String "true", otherwise
it will return the Boolean FALSE.
Parameters:
Returns:
- a wrapped boolean from the string
Booleanrepresent primitivebooleanvalues.