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

Print this page

        

*** 151,160 **** --- 151,161 ---- * to the original <code>ParameterBlock</code>. Changes to the shared sources or * parameters themselves will still be visible. * * @return an Object clone of the <code>ParameterBlock</code>. */ + @SuppressWarnings("unchecked") // casts from clone public Object clone() { ParameterBlock theClone; try { theClone = (ParameterBlock) super.clone();
*** 162,175 **** // We can't be here since we implement Cloneable. return null; } if (sources != null) { ! theClone.setSources((Vector)sources.clone()); } if (parameters != null) { ! theClone.setParameters((Vector)parameters.clone()); } return (Object) theClone; } /** --- 163,176 ---- // We can't be here since we implement Cloneable. return null; } if (sources != null) { ! theClone.setSources((Vector<Object>)sources.clone()); } if (parameters != null) { ! theClone.setParameters((Vector<Object>)parameters.clone()); } return (Object) theClone; } /**
*** 278,288 **** this.sources = sources; } /** Clears the list of source images. */ public void removeSources() { ! sources = new Vector(); } /** * Returns the number of parameters (not including source images). * @return the number of parameters in the <code>parameters</code> --- 279,289 ---- this.sources = sources; } /** Clears the list of source images. */ public void removeSources() { ! sources = new Vector<>(); } /** * Returns the number of parameters (not including source images). * @return the number of parameters in the <code>parameters</code>
*** 311,321 **** this.parameters = parameters; } /** Clears the list of parameters. */ public void removeParameters() { ! parameters = new Vector(); } /** * Adds an object to the list of parameters. * @param obj the <code>Object</code> to add to the --- 312,322 ---- this.parameters = parameters; } /** Clears the list of parameters. */ public void removeParameters() { ! parameters = new Vector<>(); } /** * Adds an object to the list of parameters. * @param obj the <code>Object</code> to add to the
*** 694,706 **** /** * Returns an array of Class objects describing the types * of the parameters. * @return an array of <code>Class</code> objects. */ ! public Class [] getParamClasses() { int numParams = getNumParameters(); ! Class [] classes = new Class[numParams]; int i; for (i = 0; i < numParams; i++) { Object obj = getObjectParameter(i); if (obj instanceof Byte) { --- 695,707 ---- /** * Returns an array of Class objects describing the types * of the parameters. * @return an array of <code>Class</code> objects. */ ! public Class<?>[] getParamClasses() { int numParams = getNumParameters(); ! Class<?>[] classes = new Class<?>[numParams]; int i; for (i = 0; i < numParams; i++) { Object obj = getObjectParameter(i); if (obj instanceof Byte) {