Boolean (Java SE 25 & JDK 25)
- All Implemented Interfaces:
Serializable, Comparable<Boolean>, Constable
-
Field Summary
Fields
The
Booleanobject corresponding to the primitive valuefalse.The
Booleanobject corresponding to the primitive valuetrue.The Class object representing the primitive type boolean.
-
Constructor Summary
Constructors
-
Method Summary
booleanReturns the value of this
Booleanobject as a boolean primitive.static intcompare(boolean x, boolean y) Compares two
booleanvalues.intCompares this
Booleaninstance with another.Returns an
Optionalcontaining the nominal descriptor for this instance.booleanReturns
trueif and only if the argument is notnulland is aBooleanobject that represents the samebooleanvalue as this object.static booleanReturns
trueif and only if the system property named by the argument exists and is equal to, ignoring case, the string"true".inthashCode()Returns a hash code for this
Booleanobject.static inthashCode(boolean value) Returns a hash code for a
booleanvalue; compatible withBoolean.hashCode().static booleanlogicalAnd(boolean a, boolean b) Returns the result of applying the logical AND operator to the specified
booleanoperands.static booleanlogicalOr(boolean a, boolean b) Returns the result of applying the logical OR operator to the specified
booleanoperands.static booleanlogicalXor(boolean a, boolean b) Returns the result of applying the logical XOR operator to the specified
booleanoperands.static booleanParses the string argument as a boolean.
toString()Returns a
Stringobject representing this Boolean's value.toString(boolean b) Returns a
Stringobject representing the specified boolean.valueOf(boolean b) Returns a
Booleaninstance representing the specifiedbooleanvalue.Returns a
Booleanwith a value represented by the specified string.
-
Field Details
-
TRUE
-
FALSE
-
TYPE
-
-
Constructor Details
-
Boolean
-
Boolean
-
-
Method Details
-
parseBoolean
-
booleanValue
-
valueOf
-
valueOf
-
toString
-
toString
-
hashCode
-
hashCode
-
equals
-
getBoolean
-
compareTo
-
compare
-
logicalAnd
-
logicalOr
-
logicalXor
-
describeConstable
-