|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.jstacs.parameters.ParameterSet
de.jstacs.data.AlphabetContainerParameterSet
public class AlphabetContainerParameterSet
Class for the ParameterSet
of an AlphabetContainer
.
Nested Class Summary | |
---|---|
static class |
AlphabetContainerParameterSet.AlphabetArrayParameterSet
Class for the parameters of an array of Alphabet s of defined length. |
static class |
AlphabetContainerParameterSet.SectionDefinedAlphabetParameterSet
Class for the parameters of an array of Alphabet s where each alphabet may be used for one or more
sections of positions. |
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 | |
---|---|
AlphabetContainerParameterSet(Alphabet alph)
Creates a new AlphabetContainerParameterSet from a single Alphabet . |
|
AlphabetContainerParameterSet(Alphabet[] alphabets)
Creates a new AlphabetContainerParameterSet from an array of Alphabet s. |
|
AlphabetContainerParameterSet(Alphabet[] alphabets,
int[] indexes)
Creates a new AlphabetContainerParameterSet from an array of Alphabet s and an
array of int s defining the number of the alphabet in alphabets that is used for
that position in indexes . |
|
AlphabetContainerParameterSet(boolean discrete,
boolean simple)
Creates a new AlphabetContainerParameterSet . |
|
AlphabetContainerParameterSet(StringBuffer representation)
Creates a new AlphabetContainerParameterSet from its XML-representation. |
Method Summary | |
---|---|
AlphabetContainerParameterSet |
clone()
Creates a full clone (deep copy) of this ParameterSet . |
protected void |
fromXML(StringBuffer representation)
Parses the instance fields of a ParameterSet from the XML-representation
as returned by ParameterSet.toXML() . |
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 . |
int |
getPossibleLength()
Returns the length of the alphabet that can be instantiated using this set. |
boolean |
isDiscrete()
If this method returns true all postions use DiscreteAlphabetParameterSet s. |
boolean |
isSimple()
If this method returns true all postions use the same alphabet. |
protected void |
loadParameters()
Loads the parameters for this ParameterSet . |
StringBuffer |
toXML()
This method returns an XML-representation of an instance of the implementing class. |
Methods inherited from class de.jstacs.parameters.ParameterSet |
---|
getErrorMessage, getId, getInstance, getInstanceClass, getNumberOfParameters, getNumberOfValues, getParameterAt, getParent, hasDefaultOrIsSet, initParameterList, initParameterList, isAtomic, isRanged, makeRanged, next, parametersLoaded, propagateId, recieveId, replaceParametersWithRangedInstance, reset, resetToFirst, setAlternativeInstanceClass, setParent, simplify, valuesToString |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AlphabetContainerParameterSet(boolean discrete, boolean simple)
AlphabetContainerParameterSet
. If discrete
is true
,
only the parameters for discrete Alphabet
s are defined. Is simple
is
true
, only a single alphabet is expected.
discrete
- if the alphabet(s) shall be discretesimple
- if there shall be only a single Alphabet
public AlphabetContainerParameterSet(StringBuffer representation) throws NonParsableException
AlphabetContainerParameterSet
from its XML-representation.
representation
- the XML-representation
NonParsableException
- is thrown if representation
could not be parsedpublic AlphabetContainerParameterSet(Alphabet alph) throws Exception
AlphabetContainerParameterSet
from a single Alphabet
.
alph
- the Alphabet
Exception
- is thrown if an error occurred during the creation of the appropriate Parameter
spublic AlphabetContainerParameterSet(Alphabet[] alphabets) throws Exception
AlphabetContainerParameterSet
from an array of Alphabet
s.
alphabets
- the Alphabet
s
Exception
- is thrown if an error occurred during the creation of the appropriate Parameter
spublic AlphabetContainerParameterSet(Alphabet[] alphabets, int[] indexes) throws Exception
AlphabetContainerParameterSet
from an array of Alphabet
s and an
array of int
s defining the number of the alphabet in alphabets
that is used for
that position in indexes
.
alphabets
- the Alphabet
sindexes
- the indexes
Exception
- is thrown if an error occurred during the creation of the appropriate Parameter
sMethod Detail |
---|
public AlphabetContainerParameterSet clone() throws CloneNotSupportedException
ParameterSet
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:ParameterSet
,
most likely with an empty constructor or the one taking just the
instance-class
this.fillWithStandardFieldsForClone
on this
instance
Object
's method clone()
clone
in class ParameterSet
ParameterSet
CloneNotSupportedException
public boolean isDiscrete()
true
all postions use DiscreteAlphabetParameterSet
s.
true
if all postions are discretepublic boolean isSimple()
true
all postions use the same alphabet.
true
if all postions use the same alphabetpublic StringBuffer toXML()
Storable
toXML
in interface Storable
toXML
in class ParameterSet
protected void fromXML(StringBuffer representation) throws NonParsableException
ParameterSet
ParameterSet
from the XML-representation
as returned by ParameterSet.toXML()
.
fromXML
in class ParameterSet
representation
- the XML-representation
NonParsableException
- is thrown if the XML-code could not be parsedpublic int getPossibleLength()
protected void loadParameters() throws Exception
ParameterSet
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
- Throws:
Exception
- an Exception
is thrown if the parameters could not be loaded- See Also:
ParameterSet.parameters
,
Parameter
public String getInstanceName()
ParameterSet
ParameterSet
.
getInstanceName
in class ParameterSet
public String getInstanceComment()
ParameterSet
ParameterSet
.
getInstanceComment
in class ParameterSet
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |