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 BooleanMethods inherited from class Object
clone, getClass, notify, notifyAll, wait, wait, waitModifier and TypeMethodDescriptionprotected Objectclone()final ClassgetClass()Returns the runtime class of an object.final voidnotify()Wakes up a single thread that is waiting on this object's monitor.final voidWakes up all threads that are waiting on this object's monitor.final voidwait()Causes current thread to wait until another thread invokes the method or the method for this object.final voidwait(long timeout) Causes current thread to wait until either another thread invokes the method or the method for this object, or a specified amount of time has elapsed.final voidwait(long timeout, int nanos) Causes current thread to wait until another thread invokes the method or the method for this object, or some other thread interrupts the current thread, or a certain amount of real time has elapsed.
-
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
-