< prev index next >

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

Print this page
@@ -22,11 +22,10 @@
   * or visit www.oracle.com if you need additional information or have any
   * questions.
   */
  
  package java.lang;
- 
  /**
   * The abstract class {@code Number} is the superclass of platform
   * classes representing numeric values that are convertible to the
   * primitive types {@code byte}, {@code double}, {@code float}, {@code
   * int}, {@code long}, and {@code short}.

@@ -44,16 +43,27 @@
   * than the input.
   *
   * See the documentation of a given {@code Number} implementation for
   * conversion details.
   *
+  * <div class="preview-block">
+  *      <div class="preview-comment">
+  *          When preview features are enabled, {@code Number} is
+  *          an abstract {@linkplain Class#isValue value class}.
+  *          Subclasses of {@code Number} can be either an {@linkplain Class#isIdentity identity class}
+  *          or a {@linkplain Class#isValue value class}.
+  *          See {@jls The Java Language Specification 8.1.1.5 Value Classes}.
+  *      </div>
+  * </div>
+  *
   * @author      Lee Boynton
   * @author      Arthur van Hoff
   * @jls 5.1.2 Widening Primitive Conversion
   * @jls 5.1.3 Narrowing Primitive Conversion
   * @since   1.0
   */
+ @jdk.internal.MigratedValueClass
  public abstract class Number implements java.io.Serializable {
      /**
       * Constructor for subclasses to call.
       */
      public Number() {super();}
< prev index next >