54 * with a {@code long}.
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(long) highestOneBit} and
64 * {@link #numberOfTrailingZeros(long) 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 Long extends Number
76 implements Comparable<Long>, Constable, ConstantDesc {
77 /**
78 * A constant holding the minimum value a {@code long} can
79 * have, -2<sup>63</sup>.
80 */
81 @Native public static final long MIN_VALUE = 0x8000000000000000L;
82
83 /**
84 * A constant holding the maximum value a {@code long} can
85 * have, 2<sup>63</sup>-1.
86 */
87 @Native public static final long MAX_VALUE = 0x7fffffffffffffffL;
88
89 /**
90 * The {@code Class} instance representing the primitive type
91 * {@code long}.
92 *
93 * @since 1.1
|
54 * with a {@code long}.
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(long) highestOneBit} and
64 * {@link #numberOfTrailingZeros(long) 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 Long extends Number
77 implements Comparable<Long>, Constable, ConstantDesc {
78 /**
79 * A constant holding the minimum value a {@code long} can
80 * have, -2<sup>63</sup>.
81 */
82 @Native public static final long MIN_VALUE = 0x8000000000000000L;
83
84 /**
85 * A constant holding the maximum value a {@code long} can
86 * have, 2<sup>63</sup>-1.
87 */
88 @Native public static final long MAX_VALUE = 0x7fffffffffffffffL;
89
90 /**
91 * The {@code Class} instance representing the primitive type
92 * {@code long}.
93 *
94 * @since 1.1
|