## javax.media.jai
Class ParameterBlockJAI

    java.lang.Object
      |
      +--java.awt.image.renderable.ParameterBlock
            |
            +--javax.media.jai.ParameterBlockJAI

All Implemented Interfaces:
  java.lang.Cloneable, ParameterList, java.io.Serializable

public class ParameterBlockJAI
extends java.awt.image.renderable.ParameterBlock
implements ParameterList

A convenience subclass of `ParameterBlock` that allows the use of default parameter values and getting/setting sources and parameters by name. A `ParameterBlockJAI` is constructed using either an `OperationDescriptor`, or an operation name (that will be looked up in the appropriate default `OperationRegistry`) and a mode which should be in `OperationDescriptor.getSupportedModes()` (such as rendered, renderable, collection or renderableCollection). If the mode is not specified `ParameterBlockJAI` will by default work with the first mode in the array of `String`s returned by `OperationDescriptor.getSupportedModes()`.

Once constructed, a `ParameterBlockJAI` appears to have no sources. It contains all the parameters required by its `OperationDescriptor` for a specified mode, each having its default value as given by the `OperationDescriptor`. Such a `ParameterBlockJAI` may not yet be usable, its sources (if any) are not set, and some or all of its parameters may have inapproriate values. The `addSource` methods of `ParameterBlock` may be used to initialize the source values, and the `set(value, index)` methods may be used to modify new parameter values. The preferred way of setting parameter values is the `setParameter(name, value)` described below. The `add()` methods should not be used since the parameter list is already long enough to hold all of the parameters required by the `OperationDescriptor`.

Additionally, `ParameterBlockJAI` offers `setParameter(name, value)` methods that take a parameter name; the index of the parameter is determined from the `OperationDescriptor` and the corresponding parameter is set. (users are strongly recommended to use this method instead of the equivalent `set(value, index)` or the deprecated `set(value, name)` methods). As in `ParameterBlock`, all parameters are stored internally as subclasses of Object and all get/set methods that take or return values of primitive types are simply convenience methods that transform values between the primitive types and their corresponding wrapper classes subclasses.

The `OperationDescriptor` that is used to initialize a `ParameterBlockJAI` at construction is not serializable and thus cannot be serialized using the default serialization mechanism. The operation name is serialized instead and included in the serialized `ParameterBlockJAI` stream. During de-serialization, the operation name is de-serialized and then looked up in the default `OperationRegistry` available at the time of de-serialization. If no `OperationDescriptor` has been registered with this `OperationRegistry` under the given operation name, a NotSerializableException will be thrown. The serialization of `ParameterBlockJAI` works correctly only if the `OperationDescriptor` registered for the operation name in question is identical to the `OperationDescriptor` that was registered with the `OperationRegistry` available at serialization time.

All parameter names are treated in a case-insensitive but retentive manner.

Warning: Serialized objects of this class will not be compatible with future releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of JAI. A future release of JAI will provide support for long term persistence.

See Also:
  Serialized Form

Fields inherited from class java.awt.image.renderable.ParameterBlock
`parameters, sources`

Constructor Summary
`ParameterBlockJAI(OperationDescriptor odesc)` Constructs a `ParameterBlockJAI` for use with an operation described by a particular `OperationDescriptor`.
`ParameterBlockJAI(OperationDescriptor odesc, java.lang.String modeName)` Constructs a `ParameterBlockJAI` for use with an operation described by a particular `OperationDescriptor` and a registry mode.
`ParameterBlockJAI(java.lang.String operationName)` Constructs a `ParameterBlockJAI` for a particular operation by name.
`ParameterBlockJAI(java.lang.String operationName, java.lang.String modeName)` Constructs a `ParameterBlockJAI` for a particular operation by name and a registry mode.

Method Summary
`java.awt.image.renderable.ParameterBlock` `add(java.lang.Object obj)` Adds an object to the list of parameters.
`boolean` `getBooleanParameter(java.lang.String paramName)` A convenience method to return a parameter as a `boolean`.
`byte` `getByteParameter(java.lang.String paramName)` A convenience method to return a parameter as a `byte`.
`char` `getCharParameter(java.lang.String paramName)` A convenience method to return a parameter as a `char`.
`double` `getDoubleParameter(java.lang.String paramName)` A convenience method to return a parameter as a `double`.
`float` `getFloatParameter(java.lang.String paramName)` A convenience method to return a parameter as a `float`.
`int` `getIntParameter(java.lang.String paramName)` A convenience method to return a parameter as an `int`.
`long` `getLongParameter(java.lang.String paramName)` A convenience method to return a parameter as a `long`.
`java.lang.String` `getMode()` Get the operation mode used to determine parameter names, classes and default values.
`java.lang.Object` `getObjectParameter(java.lang.String paramName)` Gets a named parameter as an Object.
`OperationDescriptor` `getOperationDescriptor()` Returns the `OperationDescriptor` associated with this `ParameterBlockJAI`.
`java.lang.Class[]` `getParamClasses()` Returns an array of `Class` objects describing the types of the parameters.
`ParameterListDescriptor` `getParameterListDescriptor()` Returns the `ParameterListDescriptor` that provides descriptions of the parameters associated with the operator and mode.
`short` `getShortParameter(java.lang.String paramName)` A convenience method to return a parameter as an `short`.
`int` `indexOf(java.lang.String paramName)` Deprecated. as of JAI 1.1 - use "indexOfParam" instead.
`int` `indexOfParam(java.lang.String paramName)` Returns the zero-relative index of a named parameter within the list of parameters.
`int` `indexOfSource(java.lang.String sourceName)` Returns the zero-relative index of a named source within the list of sources.
`java.awt.image.renderable.ParameterBlock` `set(boolean b, java.lang.String paramName)` Deprecated. as of JAI 1.1 - use `setParameter` instead.
`java.awt.image.renderable.ParameterBlock` `set(byte b, java.lang.String paramName)` Deprecated. as of JAI 1.1 - use `setParameter` instead.
`java.awt.image.renderable.ParameterBlock` `set(char c, java.lang.String paramName)` Deprecated. as of JAI 1.1 - use `setParameter` instead.
`java.awt.image.renderable.ParameterBlock` `set(double d, java.lang.String paramName)` Deprecated. as of JAI 1.1 - use `setParameter` instead.
`java.awt.image.renderable.ParameterBlock` `set(float f, java.lang.String paramName)` Deprecated. as of JAI 1.1 - use `setParameter` instead.
`java.awt.image.renderable.ParameterBlock` `set(int i, java.lang.String paramName)` Deprecated. as of JAI 1.1 - use `setParameter` instead.
`java.awt.image.renderable.ParameterBlock` `set(long l, java.lang.String paramName)` Deprecated. as of JAI 1.1 - use `setParameter` instead.
`java.awt.image.renderable.ParameterBlock` `set(java.lang.Object obj, int index)` Replaces an Object in the list of parameters.
`java.awt.image.renderable.ParameterBlock` `set(java.lang.Object obj, java.lang.String paramName)` Deprecated. as of JAI 1.1 - use `setParameter` instead.
`java.awt.image.renderable.ParameterBlock` `set(short s, java.lang.String paramName)` Deprecated. as of JAI 1.1 - use `setParameter` instead.
`ParameterList` `setParameter(java.lang.String paramName, boolean b)` Sets a named parameter to a `boolean` value.
`ParameterList` `setParameter(java.lang.String paramName, byte b)` Sets a named parameter to a `byte` value.
`ParameterList` `setParameter(java.lang.String paramName, char c)` Sets a named parameter to a `char` value.
`ParameterList` `setParameter(java.lang.String paramName, double d)` Sets a named parameter to a `double` value.
`ParameterList` `setParameter(java.lang.String paramName, float f)` Sets a named parameter to a `float` value.
`ParameterList` `setParameter(java.lang.String paramName, int i)` Sets a named parameter to an `int` value.
`ParameterList` `setParameter(java.lang.String paramName, long l)` Sets a named parameter to a `long` value.
`ParameterList` `setParameter(java.lang.String paramName, java.lang.Object obj)` Sets a named parameter to an `Object` value.
`ParameterList` `setParameter(java.lang.String paramName, short s)` Sets a named parameter to a `short` value.
`void` `setParameters(java.util.Vector parameters)` Sets the entire `Vector` of parameters to a given `Vector`.
`ParameterBlockJAI` `setSource(java.lang.String sourceName, java.lang.Object source)` Sets a named source to a given `Object` value.

Methods inherited from class java.awt.image.renderable.ParameterBlock

`add, add, add, add, add, add, add, addSource, clone, getByteParameter, getCharParameter, getDoubleParameter, getFloatParameter, getIntParameter, getLongParameter, getNumParameters, getNumSources, getObjectParameter, getParameters, getRenderableSource, getRenderedSource, getShortParameter, getSource, getSources, removeParameters, removeSources, set, set, set, set, set, set, set, setSource, setSources, shallowClone`

Methods inherited from class java.lang.Object
`equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ParameterBlockJAI

    public ParameterBlockJAI(OperationDescriptor odesc)

  Constructs a `ParameterBlockJAI` for use with an operation described by a particular `OperationDescriptor`. It uses the first mode in the array of `String`s returned by `OperationDescriptor.getSupportedModes()` to get the `ParameterListDescriptor` from `OperationDescriptor`. The default values of the parameters are filled in.
  Parameters:
    `odesc` - the OperationDescriptor describing the parameters to be managed.

### ParameterBlockJAI

    public ParameterBlockJAI(java.lang.String operationName)

  Constructs a `ParameterBlockJAI` for a particular operation by name. The `OperationRegistry` associated with the default instance of the `JAI` class is used to locate the `OperationDescriptor` associated with the operation name. It uses the first mode in the array of `String`s returned by `OperationDescriptor.getSupportedModes()` to get the `ParameterListDescriptor` from `OperationDescriptor`. The default values of the parameters are filled in.
  Parameters:
    `operationName` - a `String` giving the name of the operation.
  Throws:
    `java.lang.IllegalArgumentException` - if operationName is null.

### ParameterBlockJAI

    public ParameterBlockJAI(OperationDescriptor odesc,
                             java.lang.String modeName)

  Constructs a `ParameterBlockJAI` for use with an operation described by a particular `OperationDescriptor` and a registry mode. The default values of the parameters are filled in.
  Parameters:
    `odesc` - the OperationDescriptor describing the parameters to be managed.
    `modeName` - the operation mode whose paramters are to be managed.
  Throws:
    `java.lang.IllegalArgumentException` - if modeName is null or odesc is null
  Since:
    Java Advanced Imaging 1.1

### ParameterBlockJAI

    public ParameterBlockJAI(java.lang.String operationName,
                             java.lang.String modeName)

  Constructs a `ParameterBlockJAI` for a particular operation by name and a registry mode. The `OperationRegistry` associated with the default instance of the `JAI` class is used to locate the `OperationDescriptor` associated with the operation name. The default values of the parameters are filled in.
  Parameters:
    `operationName` - a `String` giving the name of the operation.
    `modeName` - the operation mode whose paramters are to be managed.
  Throws:
    `java.lang.IllegalArgumentException` - if operationName or modeName is null
  Since:
    Java Advanced Imaging 1.1

Method Detail

### indexOfSource

    public int indexOfSource(java.lang.String sourceName)

  Returns the zero-relative index of a named source within the list of sources.
  Parameters:
    `sourceName` - a `String` containing the parameter name.
  Throws:
    `java.lang.IllegalArgumentException` - if source is null or if there is no source with the specified name.
  Since:
    Java Advanced Imaging 1.1

### indexOfParam

    public int indexOfParam(java.lang.String paramName)

  Returns the zero-relative index of a named parameter within the list of parameters.
  Parameters:
    `paramName` - a `String` containing the parameter name.
  Throws:
    `java.lang.IllegalArgumentException` - if paramName is null or if there is no parameter with the specified name.
  Since:
    Java Advanced Imaging 1.1

### getOperationDescriptor

    public OperationDescriptor getOperationDescriptor()

  Returns the `OperationDescriptor` associated with this `ParameterBlockJAI`.

### getParameterListDescriptor

    public ParameterListDescriptor getParameterListDescriptor()

  Returns the `ParameterListDescriptor` that provides descriptions of the parameters associated with the operator and mode.
  Specified by:
    `getParameterListDescriptor` in interface `ParameterList`
  Since:
    Java Advanced Imaging 1.1

### getMode

    public java.lang.String getMode()

  Get the operation mode used to determine parameter names, classes and default values.
  Since:
    Java Advanced Imaging 1.1

### setSource

    public ParameterBlockJAI setSource(java.lang.String sourceName,
                                       java.lang.Object source)

  Sets a named source to a given `Object` value.
  Parameters:
    `sourceName` - a `String` naming a source.
    `source` - an `Object` value for the source.
  Throws:
    `java.lang.IllegalArgumentException` - if `source` is null.
    `java.lang.IllegalArgumentException` - if `sourceName` is null.
    `java.lang.IllegalArgumentException` - if `source` is not an instance of (any of) the expected class(es).
    `java.lang.IllegalArgumentException` - if the associated operation has no source with the supplied name.
  Since:
    Java Advanced Imaging 1.1

### getParamClasses

    public java.lang.Class[] getParamClasses()

  Returns an array of `Class` objects describing the types of the parameters. This is a more efficient implementation than that of the superclass as the parameter classes are known a priori.
  Overrides:
    `getParamClasses` in class `java.awt.image.renderable.ParameterBlock`

### getObjectParameter

    public java.lang.Object getObjectParameter(java.lang.String paramName)

  Gets a named parameter as an Object. Parameters belonging to a primitive type, such as `int`, will be returned as a member of the corresponding `Number` subclass, such as `Integer`.
  Specified by:
    `getObjectParameter` in interface `ParameterList`
  Parameters:
    `paramName` - the name of the parameter to be returned.
  Throws:
    `java.lang.IllegalArgumentException` - if there is no parameter with the specified name.
    `java.lang.IllegalStateException` - if the parameter value is still ParameterListDescriptor.NO_PARAMETER_DEFAULT

### getByteParameter

    public byte getByteParameter(java.lang.String paramName)

  A convenience method to return a parameter as a `byte`. An exception will be thrown if the parameter is of a different type.
  Specified by:
    `getByteParameter` in interface `ParameterList`
  Parameters:
    `paramName` - the name of the parameter to be returned.
  Throws:
    `java.lang.IllegalArgumentException` - if there is no parameter with the specified name.
    `ClassCastException` - if the parameter is of a different type.
    `java.lang.IllegalStateException` - if the parameter value is still ParameterListDescriptor.NO_PARAMETER_DEFAULT

### getBooleanParameter

    public boolean getBooleanParameter(java.lang.String paramName)

  A convenience method to return a parameter as a `boolean`. An exception will be thrown if the parameter is of a different type.
  Specified by:
    `getBooleanParameter` in interface `ParameterList`
  Parameters:
    `paramName` - the name of the parameter to be returned.
  Throws:
    `java.lang.IllegalArgumentException` - if there is no parameter with the specified name.
    `ClassCastException` - if the parameter is of a different type.
    `java.lang.IllegalStateException` - if the parameter value is still ParameterListDescriptor.NO_PARAMETER_DEFAULT

### getCharParameter

    public char getCharParameter(java.lang.String paramName)

  A convenience method to return a parameter as a `char`. An exception will be thrown if the parameter is of a different type.
  Specified by:
    `getCharParameter` in interface `ParameterList`
  Parameters:
    `paramName` - the name of the parameter to be returned.
  Throws:
    `java.lang.IllegalArgumentException` - if there is no parameter with the specified name.
    `ClassCastException` - if the parameter is of a different type.
    `java.lang.IllegalStateException` - if the parameter value is still ParameterListDescriptor.NO_PARAMETER_DEFAULT

### getShortParameter

    public short getShortParameter(java.lang.String paramName)

  A convenience method to return a parameter as an `short`. An exception will be thrown if the parameter is of a different type.
  Specified by:
    `getShortParameter` in interface `ParameterList`
  Parameters:
    `paramName` - the name of the parameter to be returned.
  Throws:
    `java.lang.IllegalArgumentException` - if there is no parameter with the specified name.
    `ClassCastException` - if the parameter is of a different type.
    `java.lang.IllegalStateException` - if the parameter value is still ParameterListDescriptor.NO_PARAMETER_DEFAULT

### getIntParameter

    public int getIntParameter(java.lang.String paramName)

  A convenience method to return a parameter as an `int`. An exception will be thrown if the parameter is of a different type.
  Specified by:
    `getIntParameter` in interface `ParameterList`
  Parameters:
    `paramName` - the name of the parameter to be returned.
  Throws:
    `java.lang.IllegalArgumentException` - if there is no parameter with the specified name.
    `ClassCastException` - if the parameter is of a different type.
    `java.lang.IllegalStateException` - if the parameter value is still ParameterListDescriptor.NO_PARAMETER_DEFAULT

### getLongParameter

    public long getLongParameter(java.lang.String paramName)

  A convenience method to return a parameter as a `long`. An exception will be thrown if the parameter is of a different type.
  Specified by:
    `getLongParameter` in interface `ParameterList`
  Parameters:
    `paramName` - the name of the parameter to be returned.
  Throws:
    `java.lang.IllegalArgumentException` - if there is no parameter with the specified name.
    `ClassCastException` - if the parameter is of a different type.
    `java.lang.IllegalStateException` - if the parameter value is still ParameterListDescriptor.NO_PARAMETER_DEFAULT

### getFloatParameter

    public float getFloatParameter(java.lang.String paramName)

  A convenience method to return a parameter as a `float`. An exception will be thrown if the parameter is of a different type.
  Specified by:
    `getFloatParameter` in interface `ParameterList`
  Parameters:
    `paramName` - the name of the parameter to be returned.
  Throws:
    `java.lang.IllegalArgumentException` - if there is no parameter with the specified name.
    `ClassCastException` - if the parameter is of a different type.
    `java.lang.IllegalStateException` - if the parameter value is still ParameterListDescriptor.NO_PARAMETER_DEFAULT

### getDoubleParameter

    public double getDoubleParameter(java.lang.String paramName)

  A convenience method to return a parameter as a `double`. An exception will be thrown if the parameter is of a different type.
  Specified by:
    `getDoubleParameter` in interface `ParameterList`
  Parameters:
    `paramName` - the name of the parameter to be returned.
  Throws:
    `java.lang.IllegalArgumentException` - if there is no parameter with the specified name.
    `ClassCastException` - if the parameter is of a different type.
    `java.lang.IllegalStateException` - if the parameter value is still ParameterListDescriptor.NO_PARAMETER_DEFAULT

### setParameter

    public ParameterList setParameter(java.lang.String paramName,
                                      byte b)

  Sets a named parameter to a `byte` value. Checks are made to verify that the parameter is of the right `Class` type and that the value is valid.
  Specified by:
    `setParameter` in interface `ParameterList`
  Parameters:
    `paramName` - a `String` naming a parameter.
    `b` - a `byte` value for the parameter.
  Throws:
    `java.lang.IllegalArgumentException` - if paramName is null.
    `java.lang.IllegalArgumentException` - if there is no parameter with the specified name.
    `java.lang.IllegalArgumentException` - if the class type of parameter pointed to by the paramName is not a `Byte`
    `java.lang.IllegalArgumentException` - if the parameter value is invalid.
  Since:
    Java Advanced Imaging 1.1

### setParameter

    public ParameterList setParameter(java.lang.String paramName,
                                      boolean b)

  Sets a named parameter to a `boolean` value. Checks are made to verify that the parameter is of the right `Class` type and that the value is valid.
  Specified by:
    `setParameter` in interface `ParameterList`
  Parameters:
    `paramName` - a `String` naming a parameter.
    `b` - a `boolean` value for the parameter.
  Throws:
    `java.lang.IllegalArgumentException` - if paramName is null.
    `java.lang.IllegalArgumentException` - if there is no parameter with the specified name.
    `java.lang.IllegalArgumentException` - if the class type of parameter pointed to by the paramName is not a `Boolean`
    `java.lang.IllegalArgumentException` - if the parameter value is invalid.
  Since:
    Java Advanced Imaging 1.1

### setParameter

    public ParameterList setParameter(java.lang.String paramName,
                                      char c)

  Sets a named parameter to a `char` value. Checks are made to verify that the parameter is of the right `Class` type and that the value is valid.
  Specified by:
    `setParameter` in interface `ParameterList`
  Parameters:
    `paramName` - a `String` naming a parameter.
    `c` - a `char` value for the parameter.
  Throws:
    `java.lang.IllegalArgumentException` - if paramName is null.
    `java.lang.IllegalArgumentException` - if there is no parameter with the specified name.
    `java.lang.IllegalArgumentException` - if the class type of parameter pointed to by the paramName is not a `Character`
    `java.lang.IllegalArgumentException` - if the parameter value is invalid.
  Since:
    Java Advanced Imaging 1.1

### setParameter

    public ParameterList setParameter(java.lang.String paramName,
                                      short s)

  Sets a named parameter to a `short` value. Checks are made to verify that the parameter is of the right `Class` type and that the value is valid.
  Specified by:
    `setParameter` in interface `ParameterList`
  Parameters:
    `paramName` - a `String` naming a parameter.
    `s` - a `short` value for the parameter.
  Throws:
    `java.lang.IllegalArgumentException` - if paramName is null.
    `java.lang.IllegalArgumentException` - if there is no parameter with the specified name.
    `java.lang.IllegalArgumentException` - if the class type of parameter pointed to by the paramName is not a `Short`
    `java.lang.IllegalArgumentException` - if the parameter value is invalid.
  Since:
    Java Advanced Imaging 1.1

### setParameter

    public ParameterList setParameter(java.lang.String paramName,
                                      int i)

  Sets a named parameter to an `int` value. Checks are made to verify that the parameter is of the right `Class` type and that the value is valid.
  Specified by:
    `setParameter` in interface `ParameterList`
  Parameters:
    `paramName` - a `String` naming a parameter.
    `i` - an `int` value for the parameter.
  Throws:
    `java.lang.IllegalArgumentException` - if paramName is null.
    `java.lang.IllegalArgumentException` - if there is no parameter with the specified name.
    `java.lang.IllegalArgumentException` - if the class type of parameter pointed to by the paramName is not a `Integer`
    `java.lang.IllegalArgumentException` - if the parameter value is invalid.
  Since:
    Java Advanced Imaging 1.1

### setParameter

    public ParameterList setParameter(java.lang.String paramName,
                                      long l)

  Sets a named parameter to a `long` value. Checks are made to verify that the parameter is of the right `Class` type and that the value is valid.
  Specified by:
    `setParameter` in interface `ParameterList`
  Parameters:
    `paramName` - a `String` naming a parameter.
    `l` - a `long` value for the parameter.
  Throws:
    `java.lang.IllegalArgumentException` - if paramName is null.
    `java.lang.IllegalArgumentException` - if there is no parameter with the specified name.
    `java.lang.IllegalArgumentException` - if the class type of parameter pointed to by the paramName is not a `Long`
    `java.lang.IllegalArgumentException` - if the parameter value is invalid.
  Since:
    Java Advanced Imaging 1.1

### setParameter

    public ParameterList setParameter(java.lang.String paramName,
                                      float f)

  Sets a named parameter to a `float` value. Checks are made to verify that the parameter is of the right `Class` type and that the value is valid.
  Specified by:
    `setParameter` in interface `ParameterList`
  Parameters:
    `paramName` - a `String` naming a parameter.
    `f` - a `float` value for the parameter.
  Throws:
    `java.lang.IllegalArgumentException` - if paramName is null.
    `java.lang.IllegalArgumentException` - if there is no parameter with the specified name.
    `java.lang.IllegalArgumentException` - if the class type of parameter pointed to by the paramName is not a `Float`
    `java.lang.IllegalArgumentException` - if the parameter value is invalid.
  Since:
    Java Advanced Imaging 1.1

### setParameter

    public ParameterList setParameter(java.lang.String paramName,
                                      double d)

  Sets a named parameter to a `double` value. Checks are made to verify that the parameter is of the right `Class` type and that the value is valid.
  Specified by:
    `setParameter` in interface `ParameterList`
  Parameters:
    `paramName` - a `String` naming a parameter.
    `d` - a `double` value for the parameter.
  Throws:
    `java.lang.IllegalArgumentException` - if paramName is null.
    `java.lang.IllegalArgumentException` - if there is no parameter with the specified name.
    `java.lang.IllegalArgumentException` - if the class type of parameter pointed to by the paramName is not a `Double`
    `java.lang.IllegalArgumentException` - if the parameter value is invalid.
  Since:
    Java Advanced Imaging 1.1

### setParameter

    public ParameterList setParameter(java.lang.String paramName,
                                      java.lang.Object obj)

  Sets a named parameter to an `Object` value. The value may be `null`, an instance of the class expected for this parameter, or a `DeferredData` instance the `getDataClass()` method of which returns the expected class. If the object is a `DeferredData` instance, then its wrapped data value is checked for validity if and only if its `isValid()` method returns `true`. If the object is not a `DeferredData` instance, then it is always checked for validity.
  Specified by:
    `setParameter` in interface `ParameterList`
  Parameters:
    `paramName` - a `String` naming a parameter.
    `obj` - an `Object` value for the parameter.
  Throws:
    `java.lang.IllegalArgumentException` - if paramName is null.
    `java.lang.IllegalArgumentException` - if there is no parameter with the specified name.
    `java.lang.IllegalArgumentException` - if the parameter value is invalid.
  Since:
    Java Advanced Imaging 1.1

### add

    public java.awt.image.renderable.ParameterBlock add(java.lang.Object obj)

  Adds an object to the list of parameters. This method always throws an `IllegalStateException` because the `ParameterBlockJAI` constructor initializes all parameters with their default values.
  Overrides:
    `add` in class `java.awt.image.renderable.ParameterBlock`
  Throws:
    `java.lang.IllegalStateException` - if parameters are added to an already initialized ParameterBlockJAI

### set

    public java.awt.image.renderable.ParameterBlock set(java.lang.Object obj,
                                                        int index)

  Replaces an Object in the list of parameters.
  Overrides:
    `set` in class `java.awt.image.renderable.ParameterBlock`
  Parameters:
    `obj` - The new value of the parameter.
    `index` - The zero-relative index of the parameter.
  Throws:
    `ArrayIndexOutOfBoundsException` - if `index` is negative or not less than the number of parameters expected for the associated operation.
    `java.lang.IllegalArgumentException` - if `obj` is non-`null` and not an instance of the class expected for the indicated parameter or if `obj` is an invalid value for the indicated parameter.

### setParameters

    public void setParameters(java.util.Vector parameters)

  Sets the entire `Vector` of parameters to a given `Vector`. The `Vector` is saved by reference.
  Overrides:
    `setParameters` in class `java.awt.image.renderable.ParameterBlock`
  Throws:
    `java.lang.IllegalArgumentException` - if the size of the supplied `Vector` does not equal the number of parameters of the associated operation.
    `java.lang.IllegalArgumentException` - if a non-`null`, non-`DeferredData` value is not an instance of the class expected for the indicated parameter or if `obj` is an invalid value for the indicated parameter.
    `java.lang.IllegalArgumentException` - if a non-`null`, `DeferredData` value does not wrap an instance of the class expected for the indicated parameter or if it is valid but its wrapped value is invalid for the indicated parameter.

### indexOf

    public int indexOf(java.lang.String paramName)

  Deprecated. as of JAI 1.1 - use "indexOfParam" instead.

  Returns the zero-relative index of a named parameter within the list of parameters.
  Parameters:
    `paramName` - a `String` containing the parameter name.
  Throws:
    `java.lang.IllegalArgumentException` - if paramName is null or if there is no parameter with the specified name.
  See Also:
    `indexOfParam(java.lang.String)`

### set

    public java.awt.image.renderable.ParameterBlock set(byte b,
                                                        java.lang.String paramName)

  Deprecated. as of JAI 1.1 - use `setParameter` instead.

  Sets a named parameter to a `byte` value.
  Parameters:
    `paramName` - a `String` naming a parameter.
    `b` - a `byte` value for the parameter.
  Throws:
    `java.lang.IllegalArgumentException` - if paramName is null.
    `java.lang.IllegalArgumentException` - if there is no parameter with the specified name.
  See Also:
    `setParameter(String, byte)`

### set

    public java.awt.image.renderable.ParameterBlock set(boolean b,
                                                        java.lang.String paramName)

  Deprecated. as of JAI 1.1 - use `setParameter` instead.

  Sets a named parameter to a `boolean` value.
  Parameters:
    `paramName` - a `String` naming a parameter.
    `b` - a `boolean` value for the parameter.
  Throws:
    `java.lang.IllegalArgumentException` - if paramName is null.
    `java.lang.IllegalArgumentException` - if there is no parameter with the specified name.
  See Also:
    `setParameter(String, boolean)`

### set

    public java.awt.image.renderable.ParameterBlock set(char c,
                                                        java.lang.String paramName)

  Deprecated. as of JAI 1.1 - use `setParameter` instead.

  Sets a named parameter to a `char` value.
  Parameters:
    `paramName` - a `String` naming a parameter.
    `c` - a `char` value for the parameter.
  Throws:
    `java.lang.IllegalArgumentException` - if paramName is null.
    `java.lang.IllegalArgumentException` - if there is no parameter with the specified name.
  See Also:
    `setParameter(String, char)`

### set

    public java.awt.image.renderable.ParameterBlock set(short s,
                                                        java.lang.String paramName)

  Deprecated. as of JAI 1.1 - use `setParameter` instead.

  Sets a named parameter to a short value.
  Parameters:
    `paramName` - a `String` naming a parameter.
    `s` - a short value for the parameter.
  Throws:
    `java.lang.IllegalArgumentException` - if paramName is null.
    `java.lang.IllegalArgumentException` - if there is no parameter with the specified name.
  See Also:
    `setParameter(String, short)`

### set

    public java.awt.image.renderable.ParameterBlock set(int i,
                                                        java.lang.String paramName)

  Deprecated. as of JAI 1.1 - use `setParameter` instead.

  Sets a named parameter to an `int` value.
  Parameters:
    `paramName` - a `String` naming a parameter.
    `i` - an `int` value for the parameter.
  Throws:
    `java.lang.IllegalArgumentException` - if paramName is null.
    `java.lang.IllegalArgumentException` - if there is no parameter with the specified name.
  See Also:
    `setParameter(String, int)`

### set

    public java.awt.image.renderable.ParameterBlock set(long l,
                                                        java.lang.String paramName)

  Deprecated. as of JAI 1.1 - use `setParameter` instead.

  Sets a named parameter to a `long` value.
  Parameters:
    `paramName` - a `String` naming a parameter.
    `l` - a `long` value for the parameter.
  Throws:
    `java.lang.IllegalArgumentException` - if paramName is null.
    `java.lang.IllegalArgumentException` - if there is no parameter with the specified name.
  See Also:
    `setParameter(String, long)`

### set

    public java.awt.image.renderable.ParameterBlock set(float f,
                                                        java.lang.String paramName)

  Deprecated. as of JAI 1.1 - use `setParameter` instead.

  Sets a named parameter to a `float` value.
  Parameters:
    `paramName` - a `String` naming a parameter.
    `f` - a `float` value for the parameter.
  Throws:
    `java.lang.IllegalArgumentException` - if paramName is null.
    `java.lang.IllegalArgumentException` - if there is no parameter with the specified name.
  See Also:
    `setParameter(String, float)`

### set

    public java.awt.image.renderable.ParameterBlock set(double d,
                                                        java.lang.String paramName)

  Deprecated. as of JAI 1.1 - use `setParameter` instead.

  Sets a named parameter to a `double` value.
  Parameters:
    `paramName` - a `String` naming a parameter.
    `d` - a `double` value for the parameter.
  Throws:
    `java.lang.IllegalArgumentException` - if paramName is null.
    `java.lang.IllegalArgumentException` - if there is no parameter with the specified name.
  See Also:
    `setParameter(String, double)`

### set

    public java.awt.image.renderable.ParameterBlock set(java.lang.Object obj,
                                                        java.lang.String paramName)

  Deprecated. as of JAI 1.1 - use `setParameter` instead.

  Sets a named parameter to an Object value.
  Parameters:
    `paramName` - a `String` naming a parameter.
    `obj` - an Object value for the parameter.
  Throws:
    `java.lang.IllegalArgumentException` - if obj is null, or if the class type of obj does not match the class type of parameter pointed to by the paramName.
    `java.lang.IllegalArgumentException` - if paramName is null.
    `java.lang.IllegalArgumentException` - if there is no parameter with the specified name.
  See Also:
    `setParameter(String, Object)`