src/java.base/share/classes/java/lang/Long.java

Print this page

        

*** 24,33 **** --- 24,35 ---- */ package java.lang; import java.lang.annotation.Native; + import java.lang.invoke.Constable; + import java.lang.invoke.MethodHandles; import java.math.*; import java.util.Objects; import jdk.internal.HotSpotIntrinsicCandidate; import static java.lang.String.COMPACT_STRINGS;
*** 54,64 **** * @author Arthur van Hoff * @author Josh Bloch * @author Joseph D. Darcy * @since 1.0 */ ! public final class Long extends Number implements Comparable<Long> { /** * A constant holding the minimum value a {@code long} can * have, -2<sup>63</sup>. */ @Native public static final long MIN_VALUE = 0x8000000000000000L; --- 56,66 ---- * @author Arthur van Hoff * @author Josh Bloch * @author Joseph D. Darcy * @since 1.0 */ ! public final class Long extends Number implements Comparable<Long>, Constable<Long> { /** * A constant holding the minimum value a {@code long} can * have, -2<sup>63</sup>. */ @Native public static final long MIN_VALUE = 0x8000000000000000L;
*** 2025,2032 **** --- 2027,2039 ---- */ public static long min(long a, long b) { return Math.min(a, b); } + @Override + public Long resolveConstant(MethodHandles.Lookup lookup) { + return this; + } + /** use serialVersionUID from JDK 1.0.2 for interoperability */ @Native private static final long serialVersionUID = 4290774380558885855L; }