javax.media.jai
Interface ParameterListDescriptor

All Known Implementing Classes:
ParameterListDescriptorImpl

public interface ParameterListDescriptor

This interface provides a comprehensive description of a set of parameters including parameter names, parameter defaults, valid parameter value ranges, etc. The parameter names should be used in a case retentive manner. i.e. all lookups and comparisons are case-insensitive but any request for a parameter name should return the original name with the case preserved.

Since:
JAI 1.1
See Also:
ParameterList

Field Summary
static Object NO_PARAMETER_DEFAULT
          An Object that signifies that a parameter has no default value.
 
Method Summary
 String[] getEnumeratedParameterNames()
          Return an array of the names of all parameters the type of which is EnumeratedParameter.
 EnumeratedParameter[] getEnumeratedParameterValues(String parameterName)
          Return an array of EnumeratedParameter objects corresponding to the parameter with the specified name.
 int getNumParameters()
          Returns the total number of parameters.
 Class[] getParamClasses()
          Returns an array of Classes that describe the types of parameters.
 Object[] getParamDefaults()
          Returns an array of Objects that define the default values of the parameters.
 Object getParamDefaultValue(String parameterName)
          Returns the default value of a specified parameter.
 String[] getParamNames()
          Returns an array of Strings that are the names of the parameters associated with this descriptor.
 Range getParamValueRange(String parameterName)
          Returns the Range that represents the range of valid values for the specified parameter.
 boolean isParameterValueValid(String parameterName, Object value)
          Checks to see whether the specified parameter can take on the specified value.
 

Field Detail

NO_PARAMETER_DEFAULT

public static final Object NO_PARAMETER_DEFAULT
An Object that signifies that a parameter has no default value.

Method Detail

getNumParameters

public int getNumParameters()
Returns the total number of parameters.


getParamClasses

public Class[] getParamClasses()
Returns an array of Classes that describe the types of parameters. If there are no parameters, this method returns null.


getParamNames

public String[] getParamNames()
Returns an array of Strings that are the names of the parameters associated with this descriptor. If there are no parameters, this method returns null.


getParamDefaults

public Object[] getParamDefaults()
Returns an array of Objects that define the default values of the parameters. Since null might be a valid parameter value, the NO_PARAMETER_DEFAULT static Object is used to indicate that a parameter has no default value. If there are no parameters, this method returns null.


getParamDefaultValue

public Object getParamDefaultValue(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.

Parameters:
parameterName - The name of the parameter whose default value is queried.
Throws:
IllegalArgumentException - if parameterName is null or if the parameter does not exist.

getParamValueRange

public Range getParamValueRange(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.

Parameters:
parameterName - The name of the parameter whose valid range of values is to be determined.
Throws:
IllegalArgumentException - if parameterName is null or if the parameter does not exist.

getEnumeratedParameterNames

public String[] getEnumeratedParameterNames()
Return an array of the names of all parameters the type of which is EnumeratedParameter.

Returns:
The requested array of names or null if there are no parameters with EnumeratedParameter type.

getEnumeratedParameterValues

public EnumeratedParameter[] getEnumeratedParameterValues(String parameterName)
Return an array of EnumeratedParameter objects corresponding to the parameter with the specified name.

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:
IllegalArgumentException - if parameterName is null or if the parameter does not exist.
UnsupportedOperationException - if there are no enumerated parameters associated with the descriptor.
IllegalArgumentException - if parameterName is a parameter the class of which is not a subclass of EnumeratedParameter.

isParameterValueValid

public boolean isParameterValueValid(String parameterName,
                                     Object value)
Checks to see whether the specified parameter can take on the specified value.

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:
IllegalArgumentException - if parameterName is null or if the parameter does not exist.
IllegalArgumentException - if the class of the object "value" is not an instance of the class type of parameter pointed to by the parameterName