java.lang.Object | |
↳ | java.lang.Boolean |
The wrapper for the primitive type boolean
.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Boolean | FALSE | The Boolean object that represents the primitive value
false . |
|||||||||
Boolean | TRUE | The Boolean object that represents the primitive value
true . |
|||||||||
Class<Boolean> | TYPE | The Class object that represents the primitive type boolean . |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Constructs a new
Boolean with its boolean value specified by
string . | |||||||||||
Constructs a new
Boolean with the specified primitive boolean
value. |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Gets the primitive value of this boolean, either
true or
false . | |||||||||||
Compares this object to the specified boolean object to determine their
relative order.
| |||||||||||
Compares this instance with the specified object and indicates if they
are equal.
| |||||||||||
Returns the
boolean value of the system property identified by
string . | |||||||||||
Returns an integer hash code for this boolean.
| |||||||||||
Parses the specified string as a
boolean . | |||||||||||
Converts the specified boolean to its string representation.
| |||||||||||
Returns a string containing a concise, human-readable description of this
boolean.
| |||||||||||
Parses the specified string as a boolean value.
| |||||||||||
Returns a
Boolean instance for the specified boolean value. |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class java.lang.Object
| |||||||||||
From interface java.lang.Comparable
|
The Boolean
object that represents the primitive value
false
.
The Boolean
object that represents the primitive value
true
.
The Class
object that represents the primitive type boolean
.
Constructs a new Boolean
with its boolean value specified by
string
. If string
is not null
and is equal to
"true" using a non-case sensitive comparison, the result will be a
Boolean representing the primitive value true
, otherwise it will
be a Boolean representing the primitive value false
.
string | the string representing a boolean value. |
---|
Constructs a new Boolean
with the specified primitive boolean
value.
value | the primitive boolean value, true or false .
|
---|
Gets the primitive value of this boolean, either true
or
false
.
true
or false
.
Compares this object to the specified boolean object to determine their relative order.
that | the boolean object to compare this object to. |
---|
that
are
equal; a positive value if the value of this boolean is
true
and the value of that
is false
; a
negative value if the value if this boolean is false
and
the value of that
is true
.Compares this instance with the specified object and indicates if they
are equal. In order to be equal, o
must be an instance of
Boolean
and have the same boolean value as this object.
o | the object to compare this boolean with. |
---|
true
if the specified object is equal to this
Boolean
; false
otherwise.
Returns the boolean
value of the system property identified by
string
.
string | the name of the requested system property. |
---|
true
if the system property named by string
exists and it is equal to "true" using case insensitive
comparison, false
otherwise.Returns an integer hash code for this boolean.
1231
for true
values and 1237
for false
values.
Parses the specified string as a boolean
.
s | the string representation of a boolean value. |
---|
true
if s
is not null
and is equal to
"true"
using case insensitive comparison, false
otherwise.Converts the specified boolean to its string representation.
value | the boolean to convert. |
---|
value
is true
, "false" otherwise.
Returns a string containing a concise, human-readable description of this boolean.
true
, "false"
otherwise.
Parses the specified string as a boolean value.
string | the string representation of a boolean value. |
---|
Boolean.TRUE
if string
is equal to "true" using
case insensitive comparison, Boolean.FALSE
otherwise.Returns a Boolean
instance for the specified boolean value.
If it is not necessary to get a new Boolean
instance, it is
recommended to use this method instead of the constructor, since it
returns its static instances, which results in better performance.
b | the boolean to convert to a Boolean . |
---|
Boolean.TRUE
if b
is equal to true
,
Boolean.FALSE
otherwise.