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

Print this page

        

*** 23,32 **** --- 23,35 ---- * questions. */ package java.lang; + import java.lang.invoke.Constable; + import java.lang.invoke.MethodHandles; + import jdk.internal.math.FloatingDecimal; import jdk.internal.HotSpotIntrinsicCandidate; /** * The {@code Float} class wraps a value of primitive type
*** 43,53 **** * @author Lee Boynton * @author Arthur van Hoff * @author Joseph D. Darcy * @since 1.0 */ ! public final class Float extends Number implements Comparable<Float> { /** * A constant holding the positive infinity of type * {@code float}. It is equal to the value returned by * {@code Float.intBitsToFloat(0x7f800000)}. */ --- 46,56 ---- * @author Lee Boynton * @author Arthur van Hoff * @author Joseph D. Darcy * @since 1.0 */ ! public final class Float extends Number implements Comparable<Float>, Constable<Float> { /** * A constant holding the positive infinity of type * {@code float}. It is equal to the value returned by * {@code Float.intBitsToFloat(0x7f800000)}. */
*** 976,983 **** --- 979,992 ---- */ public static float min(float a, float b) { return Math.min(a, b); } + + @Override + public Float resolveConstant(MethodHandles.Lookup lookup) { + return this; + } + /** use serialVersionUID from JDK 1.0.2 for interoperability */ private static final long serialVersionUID = -2671257302660747028L; }