jdk/src/java.base/share/classes/java/lang/Byte.java
changeset 38339 65b26013c786
parent 37521 b6e0f285c998
equal deleted inserted replaced
38338:f3909e996a6a 38339:65b26013c786
   295      * Constructs a newly allocated {@code Byte} object that
   295      * Constructs a newly allocated {@code Byte} object that
   296      * represents the specified {@code byte} value.
   296      * represents the specified {@code byte} value.
   297      *
   297      *
   298      * @param value     the value to be represented by the
   298      * @param value     the value to be represented by the
   299      *                  {@code Byte}.
   299      *                  {@code Byte}.
   300      */
   300      *
       
   301      * @deprecated
       
   302      * It is rarely appropriate to use this constructor. The static factory
       
   303      * {@link #valueOf(byte)} is generally a better choice, as it is
       
   304      * likely to yield significantly better space and time performance.
       
   305      */
       
   306     @Deprecated(since="9")
   301     public Byte(byte value) {
   307     public Byte(byte value) {
   302         this.value = value;
   308         this.value = value;
   303     }
   309     }
   304 
   310 
   305     /**
   311     /**
   309      * {@code byte} value in exactly the manner used by the
   315      * {@code byte} value in exactly the manner used by the
   310      * {@code parseByte} method for radix 10.
   316      * {@code parseByte} method for radix 10.
   311      *
   317      *
   312      * @param s         the {@code String} to be converted to a
   318      * @param s         the {@code String} to be converted to a
   313      *                  {@code Byte}
   319      *                  {@code Byte}
   314      * @throws           NumberFormatException If the {@code String}
   320      * @throws          NumberFormatException if the {@code String}
   315      *                  does not contain a parsable {@code byte}.
   321      *                  does not contain a parsable {@code byte}.
   316      * @see        java.lang.Byte#parseByte(java.lang.String, int)
   322      *
   317      */
   323      * @deprecated
       
   324      * It is rarely appropriate to use this constructor.
       
   325      * Use {@link #parseByte(String)} to convert a string to a
       
   326      * {@code byte} primitive, or use {@link #valueOf(String)}
       
   327      * to convert a string to a {@code Byte} object.
       
   328      */
       
   329     @Deprecated(since="9")
   318     public Byte(String s) throws NumberFormatException {
   330     public Byte(String s) throws NumberFormatException {
   319         this.value = parseByte(s, 10);
   331         this.value = parseByte(s, 10);
   320     }
   332     }
   321 
   333 
   322     /**
   334     /**