de.jstacs.parameters
Class SimpleParameterSet

java.lang.Object
  extended by de.jstacs.parameters.ParameterSet
      extended by de.jstacs.parameters.SimpleParameterSet
All Implemented Interfaces:
RangeIterator, Storable, Cloneable

public class SimpleParameterSet
extends ParameterSet

Class for a ParameterSet that is constructed from an array of Parameters and thus does nothing in the loadParameters()-method.

Author:
Jan Grau

Nested Class Summary
 
Nested classes/interfaces inherited from class de.jstacs.parameters.ParameterSet
ParameterSet.ParameterList
 
Field Summary
 
Fields inherited from class de.jstacs.parameters.ParameterSet
alternativeInstanceClass, errorMessage, parameters, parent, ranged
 
Constructor Summary
SimpleParameterSet(Parameter[] parameters)
          Creates a new SimpleParameterSet from an array of Parameters.
SimpleParameterSet(StringBuffer representation)
          Constructs a SimpleParameterSet from its XML-representation
 
Method Summary
 SimpleParameterSet clone()
          Creates a full clone (deep copy) of this ParameterSet.
 String getInstanceComment()
          Returns a comment (a textual description) of the class that can be constructed using this ParameterSet.
 String getInstanceName()
          Returns the name of an instance of the class that can be constructed using this ParameterSet.
protected  void loadParameters()
          Loads the parameters for this ParameterSet.
 void reset()
          Resets all parameters in this ParameterSet to their default values or null if not default value was provided.
 
Methods inherited from class de.jstacs.parameters.ParameterSet
fromXML, getErrorMessage, getId, getInstance, getInstanceClass, getNumberOfParameters, getNumberOfValues, getParameterAt, getParent, hasDefaultOrIsSet, initParameterList, initParameterList, isAtomic, isRanged, makeRanged, next, parametersLoaded, propagateId, recieveId, replaceParametersWithRangedInstance, resetToFirst, setAlternativeInstanceClass, setParent, simplify, toXML, valuesToString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleParameterSet

public SimpleParameterSet(Parameter[] parameters)
Creates a new SimpleParameterSet from an array of Parameters.

Parameters:
parameters - the parameters

SimpleParameterSet

public SimpleParameterSet(StringBuffer representation)
                   throws NonParsableException
Constructs a SimpleParameterSet from its XML-representation

Parameters:
representation - the XML-representation
Throws:
NonParsableException - a NonParsableException is thrown if representation could not be parsed
Method Detail

clone

public SimpleParameterSet clone()
                         throws CloneNotSupportedException
Description copied from class: ParameterSet
Creates a full clone (deep copy) of this ParameterSet. As a convenience-method the user can use fillWithStandardFieldsForClone(ParameterSet) on a newly created instance of a subclass of ParameterSet to obtain a clone/copy of all standard member variables (those already defined in ParameterSet) in the passed ParameterSet. Using this method, the cloning-process becomes merely three-step:
This method fulfils the conventions of Object's method clone()

Overrides:
clone in class ParameterSet
Returns:
a deep clone of this ParameterSet
Throws:
CloneNotSupportedException

reset

public void reset()
Description copied from class: ParameterSet
Resets all parameters in this ParameterSet to their default values or null if not default value was provided.

Overrides:
reset in class ParameterSet
See Also:
Parameter.reset()

loadParameters

protected void loadParameters()
Description copied from class: ParameterSet
Loads the parameters for this ParameterSet. This is in most cases done by simply creating a new ArrayList<Parameter> for the field parameters/code> and filling it with instances of subclasses of Parameter

Specified by:
loadParameters in class ParameterSet
See Also:
ParameterSet.parameters, Parameter

getInstanceName

public String getInstanceName()
Description copied from class: ParameterSet
Returns the name of an instance of the class that can be constructed using this ParameterSet.

Specified by:
getInstanceName in class ParameterSet
Returns:
the name

getInstanceComment

public String getInstanceComment()
Description copied from class: ParameterSet
Returns a comment (a textual description) of the class that can be constructed using this ParameterSet.

Specified by:
getInstanceComment in class ParameterSet
Returns:
the comment