54 * dealing with an {@code int}.
55 *
56 * <p>This is a <a href="{@docRoot}/java.base/java/lang/doc-files/ValueBased.html">value-based</a>
57 * class; programmers should treat instances that are
58 * {@linkplain #equals(Object) equal} as interchangeable and should not
59 * use instances for synchronization, or unpredictable behavior may
60 * occur. For example, in a future release, synchronization may fail.
61 *
62 * <p>Implementation note: The implementations of the "bit twiddling"
63 * methods (such as {@link #highestOneBit(int) highestOneBit} and
64 * {@link #numberOfTrailingZeros(int) numberOfTrailingZeros}) are
65 * based on material from Henry S. Warren, Jr.'s <i>Hacker's
66 * Delight</i>, (Addison Wesley, 2002).
67 *
68 * @author Lee Boynton
69 * @author Arthur van Hoff
70 * @author Josh Bloch
71 * @author Joseph D. Darcy
72 * @since 1.0
73 */
74 @jdk.internal.ValueBased
75 public final class Integer extends Number
76 implements Comparable<Integer>, Constable, ConstantDesc {
77 /**
78 * A constant holding the minimum value an {@code int} can
79 * have, -2<sup>31</sup>.
80 */
81 @Native public static final int MIN_VALUE = 0x80000000;
82
83 /**
84 * A constant holding the maximum value an {@code int} can
85 * have, 2<sup>31</sup>-1.
86 */
87 @Native public static final int MAX_VALUE = 0x7fffffff;
88
89 /**
90 * The {@code Class} instance representing the primitive type
91 * {@code int}.
92 *
93 * @since 1.1
|
54 * dealing with an {@code int}.
55 *
56 * <p>This is a <a href="{@docRoot}/java.base/java/lang/doc-files/ValueBased.html">value-based</a>
57 * class; programmers should treat instances that are
58 * {@linkplain #equals(Object) equal} as interchangeable and should not
59 * use instances for synchronization, or unpredictable behavior may
60 * occur. For example, in a future release, synchronization may fail.
61 *
62 * <p>Implementation note: The implementations of the "bit twiddling"
63 * methods (such as {@link #highestOneBit(int) highestOneBit} and
64 * {@link #numberOfTrailingZeros(int) numberOfTrailingZeros}) are
65 * based on material from Henry S. Warren, Jr.'s <i>Hacker's
66 * Delight</i>, (Addison Wesley, 2002).
67 *
68 * @author Lee Boynton
69 * @author Arthur van Hoff
70 * @author Josh Bloch
71 * @author Joseph D. Darcy
72 * @since 1.0
73 */
74 @jdk.internal.MigratedValueClass
75 @jdk.internal.ValueBased
76 public final class Integer extends Number
77 implements Comparable<Integer>, Constable, ConstantDesc {
78 /**
79 * A constant holding the minimum value an {@code int} can
80 * have, -2<sup>31</sup>.
81 */
82 @Native public static final int MIN_VALUE = 0x80000000;
83
84 /**
85 * A constant holding the maximum value an {@code int} can
86 * have, 2<sup>31</sup>-1.
87 */
88 @Native public static final int MAX_VALUE = 0x7fffffff;
89
90 /**
91 * The {@code Class} instance representing the primitive type
92 * {@code int}.
93 *
94 * @since 1.1
|