public void setParameter ( final String name , final String value ) { String [ ] currentValue = ( String [ ] ) parameters . get ( name ) ; if ( currentValue == null ) { currentValue = new String [ ] { value } ; } else { // convert the current values into a new array.. String [ ] newValues = new String [ currentValue . length + 1 ] ; System . arraycopy ( currentValue , 0 , newValues , 0 , currentValue . length ) ; newValues [ newValues . length - 1 ] = value ; currentValue = newValues ; } parameters . put ( name , currentValue ) ; }
Sets a parameter . If the parameter already exists another value will be added to the parameter values .