## javax.media.jai
Class ParameterListDescriptorImpl

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

All Implemented Interfaces:
  ParameterListDescriptor, java.io.Serializable

public class ParameterListDescriptorImpl
extends java.lang.Object
implements ParameterListDescriptor, java.io.Serializable

A concrete implementation of the `ParameterListDescriptor` interface.

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

Fields inherited from interface javax.media.jai.ParameterListDescriptor
`NO_PARAMETER_DEFAULT`

Constructor Summary
`ParameterListDescriptorImpl()` Constructor for descriptors that dont have any parameters.
`ParameterListDescriptorImpl(java.lang.Object descriptor, java.lang.String[] paramNames, java.lang.Class[] paramClasses, java.lang.Object[] paramDefaults, java.lang.Object[] validParamValues)` Constructor.

Method Summary
`java.lang.String[]` `getEnumeratedParameterNames()` Return an array of the names of all parameters the type of which is `EnumeratedParameter`.
`EnumeratedParameter[]` `getEnumeratedParameterValues(java.lang.String parameterName)` Return an array of `EnumeratedParameter` objects corresponding to the parameter with the specified name.
`static java.util.Set` `getEnumeratedValues(java.lang.Object descriptor, java.lang.Class paramClass)` Uses reflection to examine "descriptor" for `public`, `static` `final` `Field`s that are instances of "paramClass".
`int` `getNumParameters()` Returns the total number of parameters.
`java.lang.Class[]` `getParamClasses()` Returns an array of `Class`es that describe the types of parameters.
`java.lang.Object[]` `getParamDefaults()` Returns an array of `Object`s that define the default values of the parameters.
`java.lang.Object` `getParamDefaultValue(java.lang.String parameterName)` Returns the default value of a specified parameter.
`java.lang.String[]` `getParamNames()` Returns an array of `String`s that are the names of the parameters associated with this descriptor.
`Range` `getParamValueRange(java.lang.String parameterName)` Returns the `Range` that represents the range of valid values for the specified parameter.
`boolean` `isParameterValueValid(java.lang.String parameterName, java.lang.Object value)` Checks to see if the specified parameter can take on the specified value.

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

Constructor Detail

### ParameterListDescriptorImpl

    public ParameterListDescriptorImpl()

  Constructor for descriptors that dont have any parameters.

### ParameterListDescriptorImpl

    public ParameterListDescriptorImpl(java.lang.Object descriptor,
                                       java.lang.String[] paramNames,
                                       java.lang.Class[] paramClasses,
                                       java.lang.Object[] paramDefaults,
                                       java.lang.Object[] validParamValues)

  Constructor.
  Parameters:
    `descriptor` - the object to be reflected upon for enumerated values
    `paramNames` - the names of each parameter. can be `null` if there are no parameters.
    `paramClasses` - the `Class` type of each parameter. can be `null` if there are no parameters.
    `paramDefaults` - the default values for each parameter. can be `null` if there are no parameters or if there are no default values, in which case the parameter defaults are assumed to be `ParameterListDescriptor.NO_PARAMETER_DEFAULT`
    `validParamValues` - defines the valid values for each parameter.

    Each element of this array can be `null` (if the parameter can take on any value of its class or if it is an enumerated parameter whose values are to be auto-detected - see `getEnumeratedValues` ), or a `Set` (for user specified enumerated values) or a `Range` (for parameters that are `Comparable`.)

    The valid set of values for an object which is neither an `EnumeratedParameter` nor `Comparable` should just be the set of all possible instances of the associated class, i.e., the parameter has to be an instance of the specified class.

    If this array itself is `null` then it is treated as an array full of `null`s as described above.

  Throws:
    `java.lang.IllegalArgumentException` - if `paramNames` is non-null and the number of `paramClasses` or a non-null `paramDefaults` does not match the length of `paramNames`
    `java.lang.IllegalArgumentException` - if `null` is passed in for `validParamValues` for a parameter whose class is of `EnumeratedParameter` type.

Method Detail

### getEnumeratedValues

    public static java.util.Set getEnumeratedValues(java.lang.Object descriptor,
                                                    java.lang.Class paramClass)

  Uses reflection to examine "descriptor" for `public`, `static` `final` `Field`s that are instances of "paramClass".
  Parameters:
    `descriptor` - the object to be reflected upon.
    `paramClass` - the parameter class
  Returns:
    a `Set` of enumerated values.
  Throws:
    `java.lang.IllegalArgumentException` - if descriptor is `null` or paramClass is `null`
    `java.lang.IllegalArgumentException` - if "paramClass" is not an instance of `EnumeratedParameter`

### getNumParameters

    public int getNumParameters()

  Returns the total number of parameters.
  Specified by:
    `getNumParameters` in interface `ParameterListDescriptor`

### getParamClasses

    public java.lang.Class[] getParamClasses()

  Returns an array of `Class`es that describe the types of parameters. If there are no parameters, this method returns `null`.
  Specified by:
    `getParamClasses` in interface `ParameterListDescriptor`

### getParamNames

    public java.lang.String[] getParamNames()

  Returns an array of `String`s that are the names of the parameters associated with this descriptor. If there are no parameters, this method returns `null`.
  Specified by:
    `getParamNames` in interface `ParameterListDescriptor`

### getParamDefaults

    public java.lang.Object[] getParamDefaults()

  Returns an array of `Object`s that define the default values of the parameters. Default values may be `null`. The `NO_PARAMETER_DEFAULT` static `Object` indicates that a parameter has no default value. If there are no parameters, this method returns `null`.
  Specified by:
    `getParamDefaults` in interface `ParameterListDescriptor`

### getParamDefaultValue

    public java.lang.Object getParamDefaultValue(java.lang.String parameterName)

  Returns the default value of a specified parameter. The default value may be `null`. If a parameter has no default value, this method returns `NO_PARAMETER_DEFAULT`.
  Specified by:
    `getParamDefaultValue` in interface `ParameterListDescriptor`
  Parameters:
    `parameterName` - The name of the parameter whose default value is queried.
  Throws:
    `java.lang.IllegalArgumentException` - if `parameterName` is null or if the parameter does not exist.

### getParamValueRange

    public Range getParamValueRange(java.lang.String parameterName)

  Returns the `Range` that represents the range of valid values for the specified parameter. Returns `null` if the parameter can take on any value or if the valid values are not representable as a Range.
  Specified by:
    `getParamValueRange` in interface `ParameterListDescriptor`
  Parameters:
    `parameterName` - The name of the parameter whose valid range of values is to be determined.
  Throws:
    `java.lang.IllegalArgumentException` - if `parameterName` is null or if the parameter does not exist.

### getEnumeratedParameterNames

    public java.lang.String[] getEnumeratedParameterNames()

  Return an array of the names of all parameters the type of which is `EnumeratedParameter`.
  Specified by:
    `getEnumeratedParameterNames` in interface `ParameterListDescriptor`
  Returns:
    The requested array of names or `null` if there are no parameters with `EnumeratedParameter` type.

### getEnumeratedParameterValues

    public EnumeratedParameter[] getEnumeratedParameterValues(java.lang.String parameterName)

  Return an array of `EnumeratedParameter` objects corresponding to the parameter with the specified name.
  Specified by:
    `getEnumeratedParameterValues` in interface `ParameterListDescriptor`
  Parameters:
    `parameterName` - The name of the parameter for which the `EnumeratedParameter` array is to be returned.
  Returns:
    An array of `EnumeratedParameter` objects representing the range of values for the named parameter.
  Throws:
    `java.lang.IllegalArgumentException` - if `parameterName` is null or if the parameter does not exist.
    `UnsupportedOperationException` - if there are no enumerated parameters associated with the descriptor.
    `java.lang.IllegalArgumentException` - if `parameterName` is a parameter the class of which is not a subclass of `EnumeratedParameter`.

### isParameterValueValid

    public boolean isParameterValueValid(java.lang.String parameterName,
                                         java.lang.Object value)

  Checks to see if the specified parameter can take on the specified value.
  Specified by:
    `isParameterValueValid` in interface `ParameterListDescriptor`
  Parameters:
    `parameterName` - The name of the parameter for which the validity check is to be performed.
  Returns:
    true, if it is valid to pass this value in for this parameter, false otherwise.
  Throws:
    `java.lang.IllegalArgumentException` - if `parameterName` is null or if the parameter does not exist.
    `java.lang.IllegalArgumentException` - if the class of the object "value" is not an instance of the class type of parameter pointed to by the parameterName