src/share/classes/java/awt/image/renderable/ParameterBlock.java

Print this page
rev 10203 : 8048874: Replace uses of 'new Byte', 'new Short' and 'new Character' with appropriate alternative across core classes
Reviewed-by: chegar, prappo
Contributed-by: Otavio Santana <otaviojava@java.net>

*** 335,367 **** * <code>parameters</code> <code>Vector</code> * @return a new <code>ParameterBlock</code> containing * the specified parameter. */ public ParameterBlock add(byte b) { ! return add(new Byte(b)); } /** * Adds a Character to the list of parameters. * @param c the char to add to the * <code>parameters</code> <code>Vector</code> * @return a new <code>ParameterBlock</code> containing * the specified parameter. */ public ParameterBlock add(char c) { ! return add(new Character(c)); } /** * Adds a Short to the list of parameters. * @param s the short to add to the * <code>parameters</code> <code>Vector</code> * @return a new <code>ParameterBlock</code> containing * the specified parameter. */ public ParameterBlock add(short s) { ! return add(new Short(s)); } /** * Adds a Integer to the list of parameters. * @param i the int to add to the --- 335,367 ---- * <code>parameters</code> <code>Vector</code> * @return a new <code>ParameterBlock</code> containing * the specified parameter. */ public ParameterBlock add(byte b) { ! return add(Byte.valueOf(b)); } /** * Adds a Character to the list of parameters. * @param c the char to add to the * <code>parameters</code> <code>Vector</code> * @return a new <code>ParameterBlock</code> containing * the specified parameter. */ public ParameterBlock add(char c) { ! return add(Character.valueOf(c)); } /** * Adds a Short to the list of parameters. * @param s the short to add to the * <code>parameters</code> <code>Vector</code> * @return a new <code>ParameterBlock</code> containing * the specified parameter. */ public ParameterBlock add(short s) { ! return add(Short.valueOf(s)); } /** * Adds a Integer to the list of parameters. * @param i the int to add to the
*** 439,449 **** * replaced with the specified parameter * @return a new <code>ParameterBlock</code> containing * the specified parameter. */ public ParameterBlock set(byte b, int index) { ! return set(new Byte(b), index); } /** * Replaces an Object in the list of parameters with a Character. * If the index lies beyond the current source list, --- 439,449 ---- * replaced with the specified parameter * @return a new <code>ParameterBlock</code> containing * the specified parameter. */ public ParameterBlock set(byte b, int index) { ! return set(Byte.valueOf(b), index); } /** * Replaces an Object in the list of parameters with a Character. * If the index lies beyond the current source list,
*** 455,465 **** * replaced with the specified parameter * @return a new <code>ParameterBlock</code> containing * the specified parameter. */ public ParameterBlock set(char c, int index) { ! return set(new Character(c), index); } /** * Replaces an Object in the list of parameters with a Short. * If the index lies beyond the current source list, --- 455,465 ---- * replaced with the specified parameter * @return a new <code>ParameterBlock</code> containing * the specified parameter. */ public ParameterBlock set(char c, int index) { ! return set(Character.valueOf(c), index); } /** * Replaces an Object in the list of parameters with a Short. * If the index lies beyond the current source list,
*** 471,481 **** * replaced with the specified parameter * @return a new <code>ParameterBlock</code> containing * the specified parameter. */ public ParameterBlock set(short s, int index) { ! return set(new Short(s), index); } /** * Replaces an Object in the list of parameters with an Integer. * If the index lies beyond the current source list, --- 471,481 ---- * replaced with the specified parameter * @return a new <code>ParameterBlock</code> containing * the specified parameter. */ public ParameterBlock set(short s, int index) { ! return set(Short.valueOf(s), index); } /** * Replaces an Object in the list of parameters with an Integer. * If the index lies beyond the current source list,