|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.lang.Boolean
public final class Boolean
Boolean is the wrapper for the primitive type boolean.
| Field Summary | |
|---|---|
static Boolean |
FALSE
The instance of the receiver which represents falsehood. |
static Boolean |
TRUE
The instance of the receiver which represents truth. |
| Constructor Summary | |
|---|---|
Boolean(boolean value)
Constructs a new instance of this class given true or false. |
|
Boolean(String string)
Constructs a new instance of this class given a string. |
|
| Method Summary | |
|---|---|
boolean |
booleanValue()
Answers true if the receiver represents true and false if the receiver represents false. |
boolean |
equals(Object o)
Compares the argument to the receiver, and answers true if they represent the same object using a class specific comparison. |
int |
hashCode()
Answers an integer hash code for the receiver. |
static boolean |
parseBoolean(String s)
|
String |
toString()
Answers a string containing a concise, human-readable description of the receiver. |
static String |
toString(boolean value)
Converts the specified boolean to its string representation. |
| Methods inherited from class java.lang.Object |
|---|
clone, getClass, println |
| Field Detail |
|---|
public static final Boolean TRUE
public static final Boolean FALSE
| Constructor Detail |
|---|
public Boolean(String string)
string - The name of the desired boolean.public Boolean(boolean value)
value - true or false.| Method Detail |
|---|
public boolean booleanValue()
public boolean equals(Object o)
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).
equals in class Objecto - the object to compare with this object
true if the object is the same as this object
false if it is different from this objecthashCode()public int hashCode()
true when passed to equals must
answer the same value for this method.
hashCode in class Objectequals(java.lang.Object)public String toString()
toString in class Objectpublic static String toString(boolean value)
"true", otherwise answer
"false".
value - the boolean
public static boolean parseBoolean(String s)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||