public final class Boolean extends Object
Modifier and Type | Field and Description |
---|---|
static Boolean |
FALSE
The Boolean object corresponding to the primitive value false.
|
static Boolean |
TRUE
The Boolean object corresponding to the primitive value true.
|
Constructor and Description |
---|
Boolean(boolean value)
Allocates a Boolean object representing the value argument.
|
Modifier and Type | Method and Description |
---|---|
boolean |
booleanValue()
Returns the value of this Boolean object as a boolean primitive.
|
int |
compareTo(Boolean b2) |
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.
|
int |
hashCode()
Returns a hash code for this Boolean object.
|
static boolean |
parseBoolean(String s) |
String |
toString()
Returns a String object representing this Boolean's value.
|
static Boolean |
valueOf(boolean b)
Returns the object instance of i
|
static Boolean |
valueOf(String b) |
public static final Boolean FALSE
public static final Boolean TRUE
public Boolean(boolean value)
public boolean booleanValue()
public boolean equals(Object obj)
public int hashCode()
public String toString()
public static Boolean valueOf(boolean b)
b
- the primitivepublic static boolean parseBoolean(String s)
public int compareTo(Boolean b2)