- Uses of Class java.lang.Boolean
- Uses of Boolean in com.sun.nio.sctp
- Uses of Boolean in java.awt.font
- Uses of Boolean in java.lang
- Uses of Boolean in java.lang.constant
- Uses of Boolean in java.net
- Uses of Boolean in java.time.format
- Uses of Boolean in java.util
- Uses of Boolean in java.util.concurrent
- Uses of Boolean in java.util.stream
- Uses of Boolean in javax.management
- Uses of Boolean in javax.management.loading
- Uses of Boolean in javax.management.modelmbean
- Uses of Boolean in javax.management.monitor
- Uses of Boolean in javax.management.openmbean
- Uses of Boolean in javax.management.relation
- Uses of Boolean in javax.management.remote
- Uses of Boolean in javax.management.timer
- Uses of Boolean in javax.swing
- Uses of Boolean in javax.swing.filechooser
- Uses of Boolean in javax.swing.plaf.basic
- Uses of Boolean in javax.tools
- Uses of Boolean in jdk.net
- Class Boolean
- Field Summary
- Constructor Summary
- Method Summary
- Methods declared in class java.lang.Object
- 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
- Class Boolean
- Field Summary
- Constructor Summary
- Method Summary
- Methods declared in class java.lang.Object
- 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
Uses of Class
java.lang.Boolean
Classes and interfaces to represent nominal descriptors for run-time entities such as classes or method handles, and classfile entities such as constant pool entries or invokedynamic call sites.
Contains the collections framework, some internationalization support classes, a service loader, properties, random number generation, string parsing and scanning classes, base64 encoding and decoding, a bit array, and several miscellaneous utility classes.
Classes to support functional-style operations on streams of elements, such as map-reduce transformations on collections.
Provides a set of «lightweight» (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
Uses of Boolean in com.sun.nio.sctp
Uses of Boolean in java.awt.font
Uses of Boolean in java.lang
Uses of Boolean in java.lang.constant
Uses of Boolean in java.net
Uses of Boolean in java.time.format
Uses of Boolean in java.util
Uses of Boolean in java.util.concurrent
Uses of Boolean in java.util.stream
Returns a Collector which partitions the input elements according to a Predicate , and organizes them into a Map
Returns a Collector which partitions the input elements according to a Predicate , reduces the values in each partition according to another Collector , and organizes them into a Map
Uses of Boolean in javax.management
Allows the MBean to perform any operations needed after having been registered in the MBean server or after the registration has failed.
Allows the MBean to perform any operations needed after having been registered in the MBean server or after the registration has failed.
Uses of Boolean in javax.management.loading
Allows the m-let to perform any operations needed after having been registered in the MBean server or after the registration has failed.
Uses of Boolean in javax.management.modelmbean
Allows the MBean to perform any operations needed after having been registered in the MBean server or after the registration has failed.
Uses of Boolean in javax.management.monitor
Allows the monitor MBean to perform any operations needed after having been registered in the MBean server or after the registration has failed.
Uses of Boolean in javax.management.openmbean
Uses of Boolean in javax.management.relation
Uses of Boolean in javax.management.remote
Uses of Boolean in javax.management.timer
Gets a copy of the flag indicating whether a periodic notification is executed at fixed-delay or at fixed-rate.
Gets a copy of the flag indicating whether a periodic notification is executed at fixed-delay or at fixed-rate.
Allows the timer MBean to perform any operations needed after having been registered in the MBean server or after the registration has failed.
Uses of Boolean in javax.swing
Uses of Boolean in javax.swing.filechooser
Uses of Boolean in javax.swing.plaf.basic
Uses of Boolean in javax.tools
Uses of Boolean in jdk.net
Report a bug or suggest an enhancement
For further API reference and developer documentation see the Java SE Documentation, which contains more detailed, developer-targeted descriptions with conceptual overviews, definitions of terms, workarounds, and working code examples. Other versions.
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2023, Oracle and/or its affiliates, 500 Oracle Parkway, Redwood Shores, CA 94065 USA.
All rights reserved. Use is subject to license terms and the documentation redistribution policy.
Class 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 .
In addition, this class provides many methods for converting a boolean to a String and a String to a boolean , as well as other constants and methods useful when dealing with a boolean .
This is a value-based class; programmers should treat instances that are equal as interchangeable and should not use instances for synchronization, or unpredictable behavior may occur. For example, in a future release, synchronization may fail.
Field Summary
Constructor Summary
Method Summary
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.
Returns true if and only if the system property named by the argument exists and is equal to, ignoring case, the string «true» .
Methods declared in class java.lang.Object
Field Details
TRUE
FALSE
TYPE
Constructor Details
Boolean
It is rarely appropriate to use this constructor. The static factory valueOf(boolean) is generally a better choice, as it is likely to yield significantly better space and time performance. Also consider using the final fields TRUE and FALSE if possible.
Boolean
It is rarely appropriate to use this constructor. Use parseBoolean(String) to convert a string to a boolean primitive, or use valueOf(String) to convert a string to a Boolean object.
Allocates a Boolean object representing the value true if the string argument is not null and is equal, ignoring case, to the string «true» . Otherwise, allocates a Boolean object representing the value false .
Method Details
parseBoolean
Parses the string argument as a boolean. The boolean returned represents the value true if the string argument is not null and is equal, ignoring case, to the string «true» . Otherwise, a false value is returned, including for a null argument. Example: Boolean.parseBoolean(«True») returns true .
Example: Boolean.parseBoolean(«yes») returns false .
booleanValue
valueOf
Returns a Boolean instance representing the specified boolean value. If the specified boolean value is true , this method returns Boolean.TRUE ; if it is false , this method returns Boolean.FALSE . If a new Boolean instance is not required, this method should generally be used in preference to the constructor Boolean(boolean) , as this method is likely to yield significantly better space and time performance.
valueOf
Returns a Boolean with a value represented by the specified string. The Boolean returned represents a true value if the string argument is not null and is equal, ignoring case, to the string «true» . Otherwise, a false value is returned, including for a null argument.
toString
Returns a String object representing the specified boolean. If the specified boolean is true , then the string «true» will be returned, otherwise the string «false» will be returned.
toString
Returns a String object representing this Boolean’s value. If this object represents the value true , a string equal to «true» is returned. Otherwise, a string equal to «false» is returned.
hashCode
hashCode
equals
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.
getBoolean
Returns true if and only if the system property named by the argument exists and is equal to, ignoring case, the string «true» . A system property is accessible through getProperty , a method defined by the System class. If there is no property with the specified name, or if the specified name is empty or null, then false is returned.
compareTo
compare
Boolean.valueOf(x).compareTo(Boolean.valueOf(y))
logicalAnd
logicalOr
logicalXor
describeConstable
Report a bug or suggest an enhancement
For further API reference and developer documentation see the Java SE Documentation, which contains more detailed, developer-targeted descriptions with conceptual overviews, definitions of terms, workarounds, and working code examples. Other versions.
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2023, Oracle and/or its affiliates, 500 Oracle Parkway, Redwood Shores, CA 94065 USA.
All rights reserved. Use is subject to license terms and the documentation redistribution policy.
Class 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 .
In addition, this class provides many methods for converting a boolean to a String and a String to a boolean , as well as other constants and methods useful when dealing with a boolean .
This is a value-based class; programmers should treat instances that are equal as interchangeable and should not use instances for synchronization, or unpredictable behavior may occur. For example, in a future release, synchronization may fail.
Field Summary
Constructor Summary
Method Summary
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.
Returns true if and only if the system property named by the argument exists and is equal to, ignoring case, the string «true» .
Methods declared in class java.lang.Object
Field Details
TRUE
FALSE
TYPE
Constructor Details
Boolean
It is rarely appropriate to use this constructor. The static factory valueOf(boolean) is generally a better choice, as it is likely to yield significantly better space and time performance. Also consider using the final fields TRUE and FALSE if possible.
Boolean
It is rarely appropriate to use this constructor. Use parseBoolean(String) to convert a string to a boolean primitive, or use valueOf(String) to convert a string to a Boolean object.
Allocates a Boolean object representing the value true if the string argument is not null and is equal, ignoring case, to the string «true» . Otherwise, allocates a Boolean object representing the value false .
Method Details
parseBoolean
Parses the string argument as a boolean. The boolean returned represents the value true if the string argument is not null and is equal, ignoring case, to the string «true» . Otherwise, a false value is returned, including for a null argument. Example: Boolean.parseBoolean(«True») returns true .
Example: Boolean.parseBoolean(«yes») returns false .
booleanValue
valueOf
Returns a Boolean instance representing the specified boolean value. If the specified boolean value is true , this method returns Boolean.TRUE ; if it is false , this method returns Boolean.FALSE . If a new Boolean instance is not required, this method should generally be used in preference to the constructor Boolean(boolean) , as this method is likely to yield significantly better space and time performance.
valueOf
Returns a Boolean with a value represented by the specified string. The Boolean returned represents a true value if the string argument is not null and is equal, ignoring case, to the string «true» . Otherwise, a false value is returned, including for a null argument.
toString
Returns a String object representing the specified boolean. If the specified boolean is true , then the string «true» will be returned, otherwise the string «false» will be returned.
toString
Returns a String object representing this Boolean’s value. If this object represents the value true , a string equal to «true» is returned. Otherwise, a string equal to «false» is returned.
hashCode
hashCode
equals
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.
getBoolean
Returns true if and only if the system property named by the argument exists and is equal to, ignoring case, the string «true» . A system property is accessible through getProperty , a method defined by the System class. If there is no property with the specified name, or if the specified name is empty or null, then false is returned.
compareTo
compare
Boolean.valueOf(x).compareTo(Boolean.valueOf(y))
logicalAnd
logicalOr
logicalXor
describeConstable
Report a bug or suggest an enhancement
For further API reference and developer documentation see the Java SE Documentation, which contains more detailed, developer-targeted descriptions with conceptual overviews, definitions of terms, workarounds, and working code examples. Other versions.
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2023, Oracle and/or its affiliates, 500 Oracle Parkway, Redwood Shores, CA 94065 USA.
All rights reserved. Use is subject to license terms and the documentation redistribution policy.