## javax.media.jai
Class ParameterListImpl

    java.lang.Object
      |
      +--javax.media.jai.ParameterListImpl

All Implemented Interfaces:
  ParameterList, java.io.Serializable

Direct Known Subclasses:
  NegotiableCapability, TileCodecParameterList

public class ParameterListImpl
extends java.lang.Object
implements ParameterList, java.io.Serializable

A concrete implementation of the `ParameterList` interface. The number, names, Class types and default values are specified via the associated `ParameterListDescriptor` which should be supplied at construction time. This default implementation should be sufficient for most `ParameterList`s and normally need not be sub-classed.

Since:
  Java Advanced Imaging 1.1
See Also:
  `ParameterList`, `ParameterListDescriptor`, `ParameterListDescriptorImpl`, Serialized Form

Constructor Summary
`ParameterListImpl(ParameterListDescriptor descriptor)` Creates a `ParameterListImpl` using the specified `ParameterListDescriptor`.

Method Summary
`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.Object` `getObjectParameter(java.lang.String paramName)` Gets a named parameter as an `Object`.
`ParameterListDescriptor` `getParameterListDescriptor()` Returns the associated `ParameterListDescriptor`.
`short` `getShortParameter(java.lang.String paramName)` A convenience method to return a parameter as a `short`.
`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.

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

Constructor Detail

### ParameterListImpl

    public ParameterListImpl(ParameterListDescriptor descriptor)

  Creates a `ParameterListImpl` using the specified `ParameterListDescriptor`. Initializes the parameters to the defaults (could be `ParameterListDescriptor.NO_PARAMETER_DEFAULT`) specified by `descriptor`
  Parameters:
    `descriptor` - a `ParameterListDescriptor` describing the parameter names, defaults etc.
  Throws:
    `java.lang.IllegalArgumentException` - if descriptor is `null`

Method Detail

### getParameterListDescriptor

    public ParameterListDescriptor getParameterListDescriptor()

  Returns the associated `ParameterListDescriptor`.
  Specified by:
    `getParameterListDescriptor` in interface `ParameterList`

### 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.

### 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.

### 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.

### 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.

### 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.

### 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.

### 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.

### 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.

### setParameter

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

  Sets a named parameter to an `Object` 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.
    `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.

### 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 wrapper class, such as `Integer`
  Specified by:
    `getObjectParameter` in interface `ParameterList`
  Parameters:
    `paramName` - the name of the parameter to be returned.
  Throws:
    `java.lang.IllegalArgumentException` - if paramName is null.
    `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`.
  Specified by:
    `getByteParameter` in interface `ParameterList`
  Parameters:
    `paramName` - the name of the parameter to be returned.
  Throws:
    `java.lang.IllegalArgumentException` - if paramName is null.
    `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`.
  Specified by:
    `getBooleanParameter` in interface `ParameterList`
  Parameters:
    `paramName` - the name of the parameter to be returned.
  Throws:
    `java.lang.IllegalArgumentException` - if paramName is null.
    `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`.
  Specified by:
    `getCharParameter` in interface `ParameterList`
  Parameters:
    `paramName` - the name of the parameter to be returned.
  Throws:
    `java.lang.IllegalArgumentException` - if paramName is null.
    `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 a `short`.
  Specified by:
    `getShortParameter` in interface `ParameterList`
  Parameters:
    `paramName` - the name of the parameter to be returned.
  Throws:
    `java.lang.IllegalArgumentException` - if paramName is null.
    `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`.
  Specified by:
    `getIntParameter` in interface `ParameterList`
  Parameters:
    `paramName` - the name of the parameter to be returned.
  Throws:
    `java.lang.IllegalArgumentException` - if paramName is null.
    `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`.
  Specified by:
    `getLongParameter` in interface `ParameterList`
  Parameters:
    `paramName` - the name of the parameter to be returned.
  Throws:
    `java.lang.IllegalArgumentException` - if paramName is null.
    `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`.
  Specified by:
    `getFloatParameter` in interface `ParameterList`
  Parameters:
    `paramName` - the name of the parameter to be returned.
  Throws:
    `java.lang.IllegalArgumentException` - if paramName is null.
    `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`.
  Specified by:
    `getDoubleParameter` in interface `ParameterList`
  Parameters:
    `paramName` - the name of the parameter to be returned.
  Throws:
    `java.lang.IllegalArgumentException` - if paramName is null.
    `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