| |
|
| java.lang.Object java.lang.Boolean
Boolean | final public class Boolean (Code) | | The Boolean class wraps a value of the primitive type
boolean in an object. An object of type
Boolean contains a single field whose type is
boolean .
version: 12/17/01 (CLDC 1.1) since: JDK1.0, CLDC 1.0 |
Field Summary | |
final public static Boolean | FALSE The Boolean object corresponding to the primitive
value false . | final public static Boolean | TRUE The Boolean object corresponding to the primitive
value true . |
Constructor Summary | |
public | Boolean(boolean value) Allocates a Boolean object representing the
value argument. |
Method Summary | |
public boolean | booleanValue() Returns the value of this Boolean object as a boolean
primitive. | public boolean | equals(Object obj) Returns true if and only if the argument is not
null and is a Boolean object that
represents the same boolean value as this object.
Parameters: obj - the object to compare with. | public int | hashCode() Returns a hash code for this Boolean object. | public String | toString() Returns a String object representing this Boolean's value.
If this object represents the value true , a string equal
to "true" is returned. |
FALSE | final public static Boolean FALSE(Code) | | The Boolean object corresponding to the primitive
value false .
|
TRUE | final public static Boolean TRUE(Code) | | The Boolean object corresponding to the primitive
value true .
|
Boolean | public Boolean(boolean value)(Code) | | Allocates a Boolean object representing the
value argument.
Parameters: value - the value of the Boolean . |
booleanValue | public boolean booleanValue()(Code) | | Returns the value of this Boolean object as a boolean
primitive.
the primitive boolean value of this object. |
equals | public boolean equals(Object obj)(Code) | | Returns true if and only if the argument is not
null and is a Boolean object that
represents the same boolean value as this object.
Parameters: obj - the object to compare with. true if the Boolean objects represent thesame value; false otherwise. |
hashCode | public int hashCode()(Code) | | Returns a hash code for this Boolean object.
the integer 1231 if this object representstrue; returns the integer 1237 if thisobject represents false. |
toString | public String toString()(Code) | | Returns a String object representing this Boolean's value.
If this object represents the value true , a string equal
to "true" is returned. Otherwise, a string equal to
"false" is returned.
a string representation of this object. |
|
|
|