40 * The Boolean class wraps a value of the primitive type
41 * {@code boolean} in an object. An object of type
42 * {@code Boolean} contains a single field whose type is
43 * {@code boolean}.
44 *
45 * <p>In addition, this class provides many methods for
46 * converting a {@code boolean} to a {@code String} and a
47 * {@code String} to a {@code boolean}, as well as other
48 * constants and methods useful when dealing with a
49 * {@code boolean}.
50 *
51 * <p>This is a <a href="{@docRoot}/java.base/java/lang/doc-files/ValueBased.html">value-based</a>
52 * class; programmers should treat instances that are
53 * {@linkplain #equals(Object) equal} as interchangeable and should not
54 * use instances for synchronization, or unpredictable behavior may
55 * occur. For example, in a future release, synchronization may fail.
56 *
57 * @author Arthur van Hoff
58 * @since 1.0
59 */
60 @jdk.internal.ValueBased
61 public final class Boolean implements java.io.Serializable,
62 Comparable<Boolean>, Constable
63 {
64 /**
65 * The {@code Boolean} object corresponding to the primitive
66 * value {@code true}.
67 */
68 public static final Boolean TRUE = new Boolean(true);
69
70 /**
71 * The {@code Boolean} object corresponding to the primitive
72 * value {@code false}.
73 */
74 public static final Boolean FALSE = new Boolean(false);
75
76 /**
77 * The Class object representing the primitive type boolean.
78 *
79 * @since 1.1
|
40 * The Boolean class wraps a value of the primitive type
41 * {@code boolean} in an object. An object of type
42 * {@code Boolean} contains a single field whose type is
43 * {@code boolean}.
44 *
45 * <p>In addition, this class provides many methods for
46 * converting a {@code boolean} to a {@code String} and a
47 * {@code String} to a {@code boolean}, as well as other
48 * constants and methods useful when dealing with a
49 * {@code boolean}.
50 *
51 * <p>This is a <a href="{@docRoot}/java.base/java/lang/doc-files/ValueBased.html">value-based</a>
52 * class; programmers should treat instances that are
53 * {@linkplain #equals(Object) equal} as interchangeable and should not
54 * use instances for synchronization, or unpredictable behavior may
55 * occur. For example, in a future release, synchronization may fail.
56 *
57 * @author Arthur van Hoff
58 * @since 1.0
59 */
60 @jdk.internal.MigratedValueClass
61 @jdk.internal.ValueBased
62 public final class Boolean implements java.io.Serializable,
63 Comparable<Boolean>, Constable
64 {
65 /**
66 * The {@code Boolean} object corresponding to the primitive
67 * value {@code true}.
68 */
69 public static final Boolean TRUE = new Boolean(true);
70
71 /**
72 * The {@code Boolean} object corresponding to the primitive
73 * value {@code false}.
74 */
75 public static final Boolean FALSE = new Boolean(false);
76
77 /**
78 * The Class object representing the primitive type boolean.
79 *
80 * @since 1.1
|