|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--javax.media.jai.ParameterListImpl
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
ParameterLists and normally need not be sub-classed.
ParameterList,
ParameterListDescriptor,
ParameterListDescriptorImpl, Serialized Form| Constructor Summary | |
ParameterListImpl(ParameterListDescriptor descriptor)
Creates a ParameterListImpl using the specified
ParameterListDescriptor. |
|
| Method Summary | |
boolean |
getBooleanParameter(String paramName)
A convenience method to return a parameter as a boolean. |
byte |
getByteParameter(String paramName)
A convenience method to return a parameter as a byte. |
char |
getCharParameter(String paramName)
A convenience method to return a parameter as a char. |
double |
getDoubleParameter(String paramName)
A convenience method to return a parameter as a double. |
float |
getFloatParameter(String paramName)
A convenience method to return a parameter as a float. |
int |
getIntParameter(String paramName)
A convenience method to return a parameter as an int. |
long |
getLongParameter(String paramName)
A convenience method to return a parameter as a long. |
Object |
getObjectParameter(String paramName)
Gets a named parameter as an Object. |
ParameterListDescriptor |
getParameterListDescriptor()
Returns the associated ParameterListDescriptor. |
short |
getShortParameter(String paramName)
A convenience method to return a parameter as a short. |
ParameterList |
setParameter(String paramName,
boolean b)
Sets a named parameter to a boolean value. |
ParameterList |
setParameter(String paramName,
byte b)
Sets a named parameter to a byte value. |
ParameterList |
setParameter(String paramName,
char c)
Sets a named parameter to a char value. |
ParameterList |
setParameter(String paramName,
double d)
Sets a named parameter to a double value. |
ParameterList |
setParameter(String paramName,
float f)
Sets a named parameter to a float value. |
ParameterList |
setParameter(String paramName,
int i)
Sets a named parameter to an int value. |
ParameterList |
setParameter(String paramName,
long l)
Sets a named parameter to a long value. |
ParameterList |
setParameter(String paramName,
Object obj)
Sets a named parameter to an Object value. |
ParameterList |
setParameter(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 |
public ParameterListImpl(ParameterListDescriptor descriptor)
ParameterListImpl using the specified
ParameterListDescriptor. Initializes the
parameters to the defaults (could be
ParameterListDescriptor.NO_PARAMETER_DEFAULT)
specified by descriptordescriptor - a ParameterListDescriptor describing
the parameter names, defaults etc.IllegalArgumentException - if descriptor is null| Method Detail |
public ParameterListDescriptor getParameterListDescriptor()
ParameterListDescriptor.getParameterListDescriptor in interface ParameterList
public ParameterList setParameter(String paramName,
byte b)
byte value.
Checks are made to verify that the parameter is of the right
Class type and that the value is valid.setParameter in interface ParameterListparamName - a String naming a parameter.b - a byte value for the parameter.IllegalArgumentException - if paramName is null.IllegalArgumentException - if there is no parameter with the
specified name.IllegalArgumentException - if the class type of parameter
pointed to by the paramName is not a ByteIllegalArgumentException - if the parameter value is invalid.
public ParameterList setParameter(String paramName,
boolean b)
boolean value.
Checks are made to verify that the parameter is of the right
Class type and that the value is valid.setParameter in interface ParameterListparamName - a String naming a parameter.b - a boolean value for the parameter.IllegalArgumentException - if paramName is null.IllegalArgumentException - if there is no parameter with the
specified name.IllegalArgumentException - if the class type of parameter
pointed to by the paramName is not a BooleanIllegalArgumentException - if the parameter value is invalid.
public ParameterList setParameter(String paramName,
char c)
char value.
Checks are made to verify that the parameter is of the right
Class type and that the value is valid.setParameter in interface ParameterListparamName - a String naming a parameter.c - a char value for the parameter.IllegalArgumentException - if paramName is null.IllegalArgumentException - if there is no parameter with the
specified name.IllegalArgumentException - if the class type of parameter
pointed to by the paramName is not a CharacterIllegalArgumentException - if the parameter value is invalid.
public ParameterList setParameter(String paramName,
short s)
short value.
Checks are made to verify that the parameter is of the right
Class type and that the value is valid.setParameter in interface ParameterListparamName - a String naming a parameter.s - a short value for the parameter.- Throws:
IllegalArgumentException - if paramName is null.IllegalArgumentException - if there is no parameter with the
specified name.IllegalArgumentException - if the class type of parameter
pointed to by the paramName is not a ShortIllegalArgumentException - if the parameter value is invalid.
public ParameterList setParameter(String paramName,
int i)
int value.
Checks are made to verify that the parameter is of the right
Class type and that the value is valid.setParameter in interface ParameterListparamName - a String naming a parameter.i - an int value for the parameter.IllegalArgumentException - if paramName is null.IllegalArgumentException - if there is no parameter with the
specified name.IllegalArgumentException - if the class type of parameter
pointed to by the paramName is not a IntegerIllegalArgumentException - if the parameter value is invalid.
public ParameterList setParameter(String paramName,
long l)
long value.
Checks are made to verify that the parameter is of the right
Class type and that the value is valid.setParameter in interface ParameterListparamName - a String naming a parameter.l - a long value for the parameter.IllegalArgumentException - if paramName is null.IllegalArgumentException - if there is no parameter with the
specified name.IllegalArgumentException - if the class type of parameter
pointed to by the paramName is not a LongIllegalArgumentException - if the parameter value is invalid.
public ParameterList setParameter(String paramName,
float f)
float value.
Checks are made to verify that the parameter is of the right
Class type and that the value is valid.setParameter in interface ParameterListparamName - a String naming a parameter.f - a float value for the parameter.IllegalArgumentException - if paramName is null.IllegalArgumentException - if there is no parameter with the
specified name.IllegalArgumentException - if the class type of parameter
pointed to by the paramName is not a FloatIllegalArgumentException - if the parameter value is invalid.
public ParameterList setParameter(String paramName,
double d)
double value.
Checks are made to verify that the parameter is of the right
Class type and that the value is valid.setParameter in interface ParameterListparamName - a String naming a parameter.d - a double value for the parameter.IllegalArgumentException - if paramName is null.IllegalArgumentException - if there is no parameter with the
specified name.IllegalArgumentException - if the class type of parameter
pointed to by the paramName is not a DoubleIllegalArgumentException - if the parameter value is invalid.
public ParameterList setParameter(String paramName,
Object obj)
Object value.
Checks are made to verify that the parameter is of the right
Class type and that the value is valid.setParameter in interface ParameterListparamName - a String naming a parameter.obj - an Object value for the parameter.IllegalArgumentException - if paramName is null.IllegalArgumentException - if there is no parameter with the
specified name.IllegalArgumentException - if the parameter value is invalid.public Object getObjectParameter(String paramName)
Object. Parameters
belonging to a primitive type, such as int, will be returned as a
member of the corresponding wrapper class, such as
IntegergetObjectParameter in interface ParameterListparamName - the name of the parameter to be returned.IllegalArgumentException - if paramName is null.IllegalArgumentException - if there is no parameter with the
specified name.IllegalStateException - if the parameter value is still
ParameterListDescriptor.NO_PARAMETER_DEFAULTpublic byte getByteParameter(String paramName)
byte.getByteParameter in interface ParameterListparamName - the name of the parameter to be returned.IllegalArgumentException - if paramName is null.IllegalArgumentException - if there is no parameter with the
specified name.ClassCastException - if the parameter is of a different type.IllegalStateException - if the parameter value is still
ParameterListDescriptor.NO_PARAMETER_DEFAULTpublic boolean getBooleanParameter(String paramName)
boolean.getBooleanParameter in interface ParameterListparamName - the name of the parameter to be returned.IllegalArgumentException - if paramName is null.IllegalArgumentException - if there is no parameter with the
specified name.ClassCastException - if the parameter is of a different type.IllegalStateException - if the parameter value is still
ParameterListDescriptor.NO_PARAMETER_DEFAULTpublic char getCharParameter(String paramName)
char.getCharParameter in interface ParameterListparamName - the name of the parameter to be returned.IllegalArgumentException - if paramName is null.IllegalArgumentException - if there is no parameter with the
specified name.ClassCastException - if the parameter is of a different type.IllegalStateException - if the parameter value is still
ParameterListDescriptor.NO_PARAMETER_DEFAULTpublic short getShortParameter(String paramName)
short.getShortParameter in interface ParameterListparamName - the name of the parameter to be returned.IllegalArgumentException - if paramName is null.IllegalArgumentException - if there is no parameter with the
specified name.ClassCastException - if the parameter is of a different type.IllegalStateException - if the parameter value is still
ParameterListDescriptor.NO_PARAMETER_DEFAULTpublic int getIntParameter(String paramName)
int.getIntParameter in interface ParameterListparamName - the name of the parameter to be returned.IllegalArgumentException - if paramName is null.IllegalArgumentException - if there is no parameter with the
specified name.ClassCastException - if the parameter is of a different type.IllegalStateException - if the parameter value is still
ParameterListDescriptor.NO_PARAMETER_DEFAULTpublic long getLongParameter(String paramName)
long.getLongParameter in interface ParameterListparamName - the name of the parameter to be returned.IllegalArgumentException - if paramName is null.IllegalArgumentException - if there is no parameter with the
specified name.ClassCastException - if the parameter is of a different type.IllegalStateException - if the parameter value is still
ParameterListDescriptor.NO_PARAMETER_DEFAULTpublic float getFloatParameter(String paramName)
float.getFloatParameter in interface ParameterListparamName - the name of the parameter to be returned.IllegalArgumentException - if paramName is null.IllegalArgumentException - if there is no parameter with the
specified name.ClassCastException - if the parameter is of a different type.IllegalStateException - if the parameter value is still
ParameterListDescriptor.NO_PARAMETER_DEFAULTpublic double getDoubleParameter(String paramName)
double.getDoubleParameter in interface ParameterListparamName - the name of the parameter to be returned.IllegalArgumentException - if paramName is null.IllegalArgumentException - if there is no parameter with the
specified name.ClassCastException - if the parameter is of a different type.IllegalStateException - if the parameter value is still
ParameterListDescriptor.NO_PARAMETER_DEFAULT
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||