Contents:
Byte
Character
Class
ClassLoader
Cloneable
Compiler
Double
Float
Integer
Long
Math
Number
Object
Process
Runnable
Runtime
SecurityManager
Short
String
StringBuffer
System
Thread
ThreadGroup
Throwable
Void
The package java.lang
Because the classes in the java.lang package are so essential, the java.langjava.lang using their simple names.
Figure 10.1 shows the class hierarchy for the java.lang package.
java.lang.Boolean
java.lang.Object
None
java.io.Serializable
JDK 1.0 or later
The Boolean class provides an object wrapper for a boolean value. This is useful when you need to treat a booleanObject as one of their arguments. You cannot specify a booleanBoolean object that encapsulates the boolean value. Furthermore, as of JDK 1.1, the Boolean
in 1.1
// Constructors
public Boolean(boolean value);
public Boolean(String s);
// Class Methods
public static boolean getBoolean(String name);
public static Boolean valueOf(String s);
// Instance Methods
public boolean booleanValue();
public boolean equals(Object obj);
public int hashCode();
public String toString();
}
A constant Boolean object that has the value true.
A constant Boolean object that has the value false.
New as of JDK 1.1
The Class object that represents the type boolean. It is always true that Boolean.TYPE == boolean.class.
The boolean value to be made into a Boolean object.
Constructs a Boolean object with the given value.
The string to be made into a Boolean object.
Constructs a Boolean'true' (ignoring case), the value of the object is true; otherwise it is false.
The name of a system property.
The boolean value of the system property.
This methods retrieves the boolean value of a named system property.
The string to be made into a Boolean object.
A Boolean object with the value specified by the given string.
This method returns a Boolean object with the value true if the string equals "true" (ignoring case); otherwise the value of the object is false.
The boolean value contained by the object.
The object to be compared with this object.
true if the objects are equal; false if they are not.
Object.equals()
This method returns true if obj is an instance of Boolean
A hashcode based on the boolean value of the object.
Object.hashCode()
"true" if the value of the object is true; "false" otherwise.
Object.toString()
This method returns a string representation of the Boolean object.
|
Method |
Inherited From |
Method |
Inherited From |
|---|---|---|---|
|
clone() |
Object |
finalize() |
Object |
|
getClass() |
Object |
notify() |
Object |
|
notifyAll() |
Object |
wait() |
Object |
|
wait(long) |
Object |
wait(long, int) |
Object |
| Главная |