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

Print this page
rev 10195 : 8048267: Replace uses of 'new Long()' with appropriate alternative across core classes
Reviewed-by: chegar, psandoz
Contributed-by: Otavio Santana <otaviojava@java.net>


 364 
 365     /**
 366      * Adds a Integer to the list of parameters.
 367      * @param i the int to add to the
 368      *            <code>parameters</code> <code>Vector</code>
 369      * @return a new <code>ParameterBlock</code> containing
 370      *         the specified parameter.
 371      */
 372     public ParameterBlock add(int i) {
 373         return add(new Integer(i));
 374     }
 375 
 376     /**
 377      * Adds a Long to the list of parameters.
 378      * @param l the long to add to the
 379      *            <code>parameters</code> <code>Vector</code>
 380      * @return a new <code>ParameterBlock</code> containing
 381      *         the specified parameter.
 382      */
 383     public ParameterBlock add(long l) {
 384         return add(new Long(l));
 385     }
 386 
 387     /**
 388      * Adds a Float to the list of parameters.
 389      * @param f the float to add to the
 390      *            <code>parameters</code> <code>Vector</code>
 391      * @return a new <code>ParameterBlock</code> containing
 392      *         the specified parameter.
 393      */
 394     public ParameterBlock add(float f) {
 395         return add(new Float(f));
 396     }
 397 
 398     /**
 399      * Adds a Double to the list of parameters.
 400      * @param d the double to add to the
 401      *            <code>parameters</code> <code>Vector</code>
 402      * @return a new <code>ParameterBlock</code> containing
 403      *         the specified parameter.
 404      */


 488      * @return a new <code>ParameterBlock</code> containing
 489      *        the specified parameter.
 490      */
 491     public ParameterBlock set(int i, int index) {
 492         return set(new Integer(i), index);
 493     }
 494 
 495     /**
 496      * Replaces an Object in the list of parameters with a Long.
 497      * If the index lies beyond the current source list,
 498      * the list is extended with nulls as needed.
 499      * @param l the parameter that replaces the
 500      *        parameter at the specified index in the
 501      *        <code>parameters</code> <code>Vector</code>
 502      * @param index the index of the parameter to be
 503      *        replaced with the specified parameter
 504      * @return a new <code>ParameterBlock</code> containing
 505      *        the specified parameter.
 506      */
 507     public ParameterBlock set(long l, int index) {
 508         return set(new Long(l), index);
 509     }
 510 
 511     /**
 512      * Replaces an Object in the list of parameters with a Float.
 513      * If the index lies beyond the current source list,
 514      * the list is extended with nulls as needed.
 515      * @param f the parameter that replaces the
 516      *        parameter at the specified index in the
 517      *        <code>parameters</code> <code>Vector</code>
 518      * @param index the index of the parameter to be
 519      *        replaced with the specified parameter
 520      * @return a new <code>ParameterBlock</code> containing
 521      *        the specified parameter.
 522      */
 523     public ParameterBlock set(float f, int index) {
 524         return set(new Float(f), index);
 525     }
 526 
 527     /**
 528      * Replaces an Object in the list of parameters with a Double.




 364 
 365     /**
 366      * Adds a Integer to the list of parameters.
 367      * @param i the int to add to the
 368      *            <code>parameters</code> <code>Vector</code>
 369      * @return a new <code>ParameterBlock</code> containing
 370      *         the specified parameter.
 371      */
 372     public ParameterBlock add(int i) {
 373         return add(new Integer(i));
 374     }
 375 
 376     /**
 377      * Adds a Long to the list of parameters.
 378      * @param l the long to add to the
 379      *            <code>parameters</code> <code>Vector</code>
 380      * @return a new <code>ParameterBlock</code> containing
 381      *         the specified parameter.
 382      */
 383     public ParameterBlock add(long l) {
 384         return add(l);
 385     }
 386 
 387     /**
 388      * Adds a Float to the list of parameters.
 389      * @param f the float to add to the
 390      *            <code>parameters</code> <code>Vector</code>
 391      * @return a new <code>ParameterBlock</code> containing
 392      *         the specified parameter.
 393      */
 394     public ParameterBlock add(float f) {
 395         return add(new Float(f));
 396     }
 397 
 398     /**
 399      * Adds a Double to the list of parameters.
 400      * @param d the double to add to the
 401      *            <code>parameters</code> <code>Vector</code>
 402      * @return a new <code>ParameterBlock</code> containing
 403      *         the specified parameter.
 404      */


 488      * @return a new <code>ParameterBlock</code> containing
 489      *        the specified parameter.
 490      */
 491     public ParameterBlock set(int i, int index) {
 492         return set(new Integer(i), index);
 493     }
 494 
 495     /**
 496      * Replaces an Object in the list of parameters with a Long.
 497      * If the index lies beyond the current source list,
 498      * the list is extended with nulls as needed.
 499      * @param l the parameter that replaces the
 500      *        parameter at the specified index in the
 501      *        <code>parameters</code> <code>Vector</code>
 502      * @param index the index of the parameter to be
 503      *        replaced with the specified parameter
 504      * @return a new <code>ParameterBlock</code> containing
 505      *        the specified parameter.
 506      */
 507     public ParameterBlock set(long l, int index) {
 508         return set(l, index);
 509     }
 510 
 511     /**
 512      * Replaces an Object in the list of parameters with a Float.
 513      * If the index lies beyond the current source list,
 514      * the list is extended with nulls as needed.
 515      * @param f the parameter that replaces the
 516      *        parameter at the specified index in the
 517      *        <code>parameters</code> <code>Vector</code>
 518      * @param index the index of the parameter to be
 519      *        replaced with the specified parameter
 520      * @return a new <code>ParameterBlock</code> containing
 521      *        the specified parameter.
 522      */
 523     public ParameterBlock set(float f, int index) {
 524         return set(new Float(f), index);
 525     }
 526 
 527     /**
 528      * Replaces an Object in the list of parameters with a Double.