Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## de.jstacs.parameters
Class InstanceParameterSet

    java.lang.Object
      de.jstacs.parameters.ParameterSet
          de.jstacs.parameters.InstanceParameterSet

All Implemented Interfaces:
  GalaxyConvertible, RangeIterator, Storable, Cloneable

Direct Known Subclasses:
  AbstractBurnInTestParameterSet, AbstractTerminationCondition.AbstractTerminationConditionParameterSet, Alphabet.AlphabetParameterSet, AlphabetContainerParameterSet, BTExplainingAwayResidual.BTExplainingAwayResidualParameterSet, BTMutualInformation.BTMutualInformationParameterSet, InhomogeneousMarkov.InhomogeneousMarkovParameterSet, PMMExplainingAwayResidual.PMMExplainingAwayResidualParameterSet, PMMMutualInformation.PMMMutualInformationParameterSet, SequenceScoringParameterSet

    public abstract class InstanceParameterSet

extends ParameterSet

Container class for a set of `Parameter`s that can be used to instantiate another class.

Author:
  Jan Grau, Jens Keilwagen

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
`errorMessage, parameters, parent, ranged`

Constructor Summary
`InstanceParameterSet(Class instanceClass)` Constructs an `InstanceParameterSet` from the class that can be instantiated using this `InstanceParameterSet`.
`InstanceParameterSet(StringBuffer representation)` The standard constructor for the interface `Storable`.

Method Summary
`protected void` | `fromXML(StringBuffer representation)` Parses the instance fields of a `ParameterSet` from the XML representation as returned by `ParameterSet.toXML()`.
`InstantiableFromParameterSet` | `getInstance()` Returns a new instance of the class of `getInstanceClass()` that was created using this `ParameterSet`.
`Class` | `getInstanceClass()` Returns the class of the instances that can be constructed using this set.
`abstract String` | `getInstanceComment()` Returns a comment (a textual description) of the class that can be constructed using this `ParameterSet`.
`abstract String` | `getInstanceName()` Returns the name of an instance of the class that can be constructed using this `ParameterSet`.
`StringBuffer` | `toXML()` This method returns an XML representation as `StringBuffer` of an instance of the implementing class.

Methods inherited from class de.jstacs.parameters.ParameterSet
`clone, fromGalaxy, getErrorMessage, getId, getIndex, getNumberOfParameters, getNumberOfValues, getParameterAt, getParent, hasDefaultOrIsSet, initParameterList, initParameterList, isAtomic, isRanged, loadParameters, makeRanged, next, parametersLoaded, propagateId, recieveId, replaceParametersWithRangedInstance, reset, resetToFirst, setParent, simplify, toGalaxy, valuesToString`

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

Constructor Detail

### InstanceParameterSet

    public InstanceParameterSet(Class instanceClass)
                         throws IllegalArgumentException

  Constructs an `InstanceParameterSet` from the class that can be instantiated using this `InstanceParameterSet`. The set of parameters is loaded by the `ParameterSet.loadParameters()`-method if this `InstanceParameterSet` is expected to be filled with values.

  Parameters:
    `instanceClass` - the class to be instantiated
  Throws:
    `IllegalArgumentException` - if `instanceClass` is null

### InstanceParameterSet

    public InstanceParameterSet(StringBuffer representation)
                         throws NonParsableException

  The standard constructor for the interface `Storable`. Constructs an `InstanceParameterSet` out of an XML representation.

  Parameters:
    `representation` - the XML representation as `StringBuffer`
  Throws:
    `NonParsableException` - if the `InstanceParameterSet` could not be reconstructed out of the `StringBuffer` `representation`

Method Detail

### getInstanceClass

    public Class getInstanceClass()

  Returns the class of the instances that can be constructed using this set.

  Returns:
    the class of the instances

### getInstance

    public InstantiableFromParameterSet getInstance()
                                             throws ParameterSetParser.NotInstantiableException

  Returns a new instance of the class of `getInstanceClass()` that was created using this `ParameterSet`.

  Returns:
    the new instance of the class
  Throws:
    `ParameterSetParser.NotInstantiableException` - if the class could not be instantiated
  See Also:
    `ParameterSetParser`

### getInstanceComment

    public abstract String getInstanceComment()

  Returns a comment (a textual description) of the class that can be constructed using this `ParameterSet`.

  Returns:
    the comment of the class

### getInstanceName

    public abstract String getInstanceName()

  Returns the name of an instance of the class that can be constructed using this `ParameterSet`.

  Returns:
    the name of the class

### toXML

    public StringBuffer toXML()

  Description copied from interface: `Storable`
  This method returns an XML representation as `StringBuffer` of an instance of the implementing class.

  Specified by:
    `toXML` in interface `Storable`
  Overrides:
    `toXML` in class `ParameterSet`
  Returns:
    the XML representation

### fromXML

    protected void fromXML(StringBuffer representation)
                    throws NonParsableException

  Description copied from class: `ParameterSet`
  Parses the instance fields of a `ParameterSet` from the XML representation as returned by `ParameterSet.toXML()`.

  Overrides:
    `fromXML` in class `ParameterSet`
  Parameters:
    `representation` - the XML representation as `StringBuffer`
  Throws:
    `NonParsableException` - if the XML code could not be parsed
  See Also:
    `ParameterSet.toXML()`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD