org.graffiti.plugin
Class AbstractParametrizable

java.lang.Object
  extended by org.graffiti.plugin.AbstractParametrizable
All Implemented Interfaces:
Parametrizable
Direct Known Subclasses:
AbstractAlgorithm, AbstractInputSerializer, AbstractOutputSerializer

public abstract class AbstractParametrizable
extends Object
implements Parametrizable

Version:
$Revision$ $Date$
Author:
brunner

Field Summary
protected  Parameter<?>[] parameters
          The parameters this Parametrizable can use.
 
Constructor Summary
AbstractParametrizable()
           
 
Method Summary
static Parameter<?>[] copyParameters(Parameter<?>[] params)
           
protected  Parameter<?>[] getAlgorithmParameters()
           
 Parameter<?>[] getDefaultParameters()
          Returns the default parameters for this Parametrizable.
 Parameter<?>[] getParameters()
          Returns a list of Parameter that are set for this Parametrizable.
 Parameter<?>[] getUserParameters()
          Return the user's default parameters;
 void saveUserParameters()
          Save the currently set parameters as user defaults.
 void saveUserParameters(Parameter<?>[] params)
          Save the given parameters as user defaults.
protected  void setAlgorithmParameters(Parameter<?>[] params)
           
 void setParameters(Parameter<?>[] params)
          Sets the parameters for this Parametrizable.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.graffiti.plugin.Parametrizable
getName
 

Field Detail

parameters

protected Parameter<?>[] parameters
The parameters this Parametrizable can use.

Constructor Detail

AbstractParametrizable

public AbstractParametrizable()
Method Detail

setParameters

public final void setParameters(Parameter<?>[] params)
Description copied from interface: Parametrizable
Sets the parameters for this Parametrizable. Must have the same types and order as the array returned by getParameter.

Specified by:
setParameters in interface Parametrizable
See Also:
Parametrizable.setParameters(org.graffiti.plugin.parameter.Parameter[])

setAlgorithmParameters

protected void setAlgorithmParameters(Parameter<?>[] params)

getParameters

public final Parameter<?>[] getParameters()
Description copied from interface: Parametrizable
Returns a list of Parameter that are set for this Parametrizable.

Specified by:
getParameters in interface Parametrizable
Returns:
a collection of Parameter that are needed by the Parametrizable.
See Also:
Parametrizable.getParameters()

getAlgorithmParameters

protected Parameter<?>[] getAlgorithmParameters()

getDefaultParameters

public Parameter<?>[] getDefaultParameters()
Description copied from interface: Parametrizable
Returns the default parameters for this Parametrizable.

Specified by:
getDefaultParameters in interface Parametrizable
Returns:
the parametrizable's default parameters
See Also:
Parametrizable.getDefaultParameters()

getUserParameters

public Parameter<?>[] getUserParameters()
Return the user's default parameters;

Returns:
the user's default parameters

saveUserParameters

public void saveUserParameters()
Save the currently set parameters as user defaults.


saveUserParameters

public void saveUserParameters(Parameter<?>[] params)
Save the given parameters as user defaults.


copyParameters

public static Parameter<?>[] copyParameters(Parameter<?>[] params)


Generated at 2012-05-30 11:00:36 PM CEST