Class Boolean
java.lang.Object
java.lang.Boolean
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.
Since: JDK1.0, CLDC 1.0
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionBoolean(boolean value) Allocates a Boolean object representing the value argument. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of this Boolean object as a boolean primitive.intbooleanReturns true if and only if the argument is not null and is a Boolean object that represents the same boolean value as this object.inthashCode()Returns a hash code for this Boolean object.static booleantoString()Returns a String object representing this Boolean's value.static BooleanvalueOf(boolean b) Returns the object instance of istatic Boolean
-
Field Details
-
FALSE
The Boolean object corresponding to the primitive value false. -
TRUE
The Boolean object corresponding to the primitive value true.
-
-
Constructor Details
-
Boolean
public Boolean(boolean value) Allocates a Boolean object representing the value argument. value - the value of the Boolean.
-
-
Method Details
-
booleanValue
public boolean booleanValue()Returns the value of this Boolean object as a boolean primitive. -
equals
-
hashCode
-
toString
-
valueOf
Returns the object instance of i- Parameters:
b- the primitive- Returns:
- object instance
-
valueOf
-
parseBoolean
-
compareTo
-