Class java.lang.Boolean
All Packages This Package Previous Next
Class java.lang.Boolean
java.lang.Object
|
+----java.lang.Boolean
-
public final class
Boolean
-
extends Object
The Boolean class provides an object wrapper for Boolean data values, and
serves as a place for boolean-oriented operations.
A wrapper is useful because most of Java's utility classes require the use
of objects. Since booleans are not objects in Java, they need to be
"wrapped" in a Boolean instance.
-
Version:
-
1.16, 07/27/95
-
Author:
-
Arthur van Hoff
-
FALSE
-
Assigns this Boolean to be false.
-
TRUE
-
Assigns this Boolean to be true.
-
Boolean(boolean)
-
Constructs a Boolean object initialized to the specified boolean
value.
-
booleanValue()
-
Returns the value of this Boolean object as a boolean.
-
equals(Object)
-
Compares this object against the specified object.
-
getBoolean(String)
-
Gets a Boolean from the properties.
-
toString()
-
Returns a new String object representing this Boolean's value.
TRUE
public final static Boolean TRUE
-
Assigns this Boolean to be true.
FALSE
public final static Boolean FALSE
-
Assigns this Boolean to be false.
Boolean
public Boolean(boolean value)
-
Constructs a Boolean object initialized to the specified boolean
value.
-
Parameters:
-
value
-
the value of the boolean
booleanValue
public boolean booleanValue()
-
Returns the value of this Boolean object as a boolean.
toString
public String toString()
-
Returns a new String object representing this Boolean's value.
-
Overrides:
-
toString in class Object
equals
public boolean equals(Object obj)
-
Compares this object against the specified object.
-
Parameters:
-
obj
-
the object to compare with
-
Returns:
-
true if the objects are the same; false otherwise.
-
Overrides:
-
equals in class Object
getBoolean
public static boolean getBoolean(String name)
-
Gets a Boolean from the properties.
-
Parameters:
-
name
-
the property name.
All Packages This Package Previous Next