jdk/src/java.base/share/classes/java/lang/Short.java
changeset 37521 b6e0f285c998
parent 33519 a33d1c19cbc8
equal deleted inserted replaced
37520:f308aaf25d07 37521:b6e0f285c998
   300      * Constructs a newly allocated {@code Short} object that
   300      * Constructs a newly allocated {@code Short} object that
   301      * represents the specified {@code short} value.
   301      * represents the specified {@code short} value.
   302      *
   302      *
   303      * @param value     the value to be represented by the
   303      * @param value     the value to be represented by the
   304      *                  {@code Short}.
   304      *                  {@code Short}.
   305      */
   305      *
       
   306      * @deprecated
       
   307      * It is rarely appropriate to use this constructor. The static factory
       
   308      * {@link #valueOf(short)} is generally a better choice, as it is
       
   309      * likely to yield significantly better space and time performance.
       
   310      */
       
   311     @Deprecated(since="9")
   306     public Short(short value) {
   312     public Short(short value) {
   307         this.value = value;
   313         this.value = value;
   308     }
   314     }
   309 
   315 
   310     /**
   316     /**
   316      *
   322      *
   317      * @param s the {@code String} to be converted to a
   323      * @param s the {@code String} to be converted to a
   318      *          {@code Short}
   324      *          {@code Short}
   319      * @throws  NumberFormatException If the {@code String}
   325      * @throws  NumberFormatException If the {@code String}
   320      *          does not contain a parsable {@code short}.
   326      *          does not contain a parsable {@code short}.
   321      * @see     java.lang.Short#parseShort(java.lang.String, int)
   327      *
   322      */
   328      * @deprecated
       
   329      * It is rarely appropriate to use this constructor.
       
   330      * Use {@link #parseShort(String)} to convert a string to a
       
   331      * {@code short} primitive, or use {@link #valueOf(String)}
       
   332      * to convert a string to a {@code Short} object.
       
   333      */
       
   334     @Deprecated(since="9")
   323     public Short(String s) throws NumberFormatException {
   335     public Short(String s) throws NumberFormatException {
   324         this.value = parseShort(s, 10);
   336         this.value = parseShort(s, 10);
   325     }
   337     }
   326 
   338 
   327     /**
   339     /**