public class AlphabetContainerParameterSet extends AlphabetContainer.AbstractAlphabetContainerParameterSet<AlphabetContainer>
ParameterSet
of an AlphabetContainer
.Modifier and Type | Class and Description |
---|---|
static class |
AlphabetContainerParameterSet.AlphabetArrayParameterSet
Class for the parameters of an array of
Alphabet s of defined
length. |
static class |
AlphabetContainerParameterSet.SectionDefinedAlphabetParameterSet
|
ParameterSet.ParameterList
errorMessage, parameters, parent
Modifier and Type | Method and Description |
---|---|
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
AlphabetContainer that can be instantiated using
this ParameterSet . |
boolean |
isDiscrete()
Indicates if all positions use
DiscreteAlphabet.DiscreteAlphabetParameterSet , i.e. |
boolean |
isSimple()
Indicates if all positions use the same
Alphabet , i.e. |
StringBuffer |
toXML()
This method returns an XML representation as
StringBuffer of an
instance of the implementing class. |
clone
getInstance, getInstanceClass
fromGalaxy, getAllParameterNames, getComment, getComment, getErrorMessage, getIndex, getName, getName, getNumberOfParameters, getParameterAt, getParameterForName, getParent, hasDefaultOrIsSet, initParameterList, initParameterList, isAtomic, isComparable, parametersLoaded, reset, setParent, toGalaxy
public AlphabetContainerParameterSet(AlphabetContainer.AlphabetContainerType type, boolean simple) throws Exception
AlphabetContainerParameterSet
of an
AlphabetContainer
with AlphabetContainer.AlphabetContainerType
type
. If simple
is true
, only a
single Alphabet
is expected.type
- the type of the alphabet(s)simple
- indicates if there shall be only a single Alphabet
Exception
- if the parameters could not be created for the given argumentsAlphabetContainer.AlphabetContainerType
,
InstanceParameterSet.InstanceParameterSet(Class)
public AlphabetContainerParameterSet() throws Exception
AlphabetContainerParameterSet
of a
complex AlphabetContainer
with type
AlphabetContainer.AlphabetContainerType.BOTH
.Exception
- if the ParameterSet
could not be createdAlphabetContainerParameterSet(AlphabetContainer.AlphabetContainerType, boolean)
public AlphabetContainerParameterSet(StringBuffer representation) throws NonParsableException
Storable
.
Creates a new AlphabetContainerParameterSet
out of its XML
representation.representation
- the XML representation as StringBuffer
NonParsableException
- if the AlphabetContainerParameterSet
could not be
reconstructed out of the XML representation (the
StringBuffer
representation
could not be
parsed)InstanceParameterSet.InstanceParameterSet(StringBuffer)
,
Storable
public AlphabetContainerParameterSet(Alphabet alph) throws Exception
alph
- the Alphabet
Exception
- if an error occurred during the creation of the appropriate
parametersInstanceParameterSet.InstanceParameterSet(Class)
public AlphabetContainerParameterSet(Alphabet[] alphabets) throws Exception
AlphabetContainerParameterSet
from an array of
Alphabet
s.alphabets
- the array of Alphabet
sException
- if an error occurred during the creation of the appropriate
parametersInstanceParameterSet.InstanceParameterSet(Class)
protected AlphabetContainerParameterSet(Class<? extends AlphabetContainer> instanceClass, Alphabet... alphabets) throws Exception
AlphabetContainerParameterSet
from an array of
Alphabet
s for a given sub-class of AlphabetContainer
.instanceClass
- the sub-class fo AlphabetContainer
alphabets
- the alphabetsException
- if the parameters could not be created for the given argumentspublic AlphabetContainerParameterSet(Alphabet[] alphabets, int[] indexes) throws Exception
AlphabetContainerParameterSet
from an array of
Alphabet
s and an array of int
s defining the
Alphabet
index i
in alphabets
that is used for position i
.alphabets
- the Alphabet
sindexes
- the indexesException
- if an error occurred during the creation of the appropriate
parametersInstanceParameterSet.InstanceParameterSet(Class)
public boolean isDiscrete()
DiscreteAlphabet.DiscreteAlphabetParameterSet
, i.e.
if all Alphabet
s of the corresponding AlphabetContainer
are discrete.isDiscrete
in class AlphabetContainer.AbstractAlphabetContainerParameterSet<AlphabetContainer>
true
if all positions are discrete,
false
otherwiseAlphabetContainer.isDiscrete()
public boolean isSimple()
AlphabetContainer.AbstractAlphabetContainerParameterSet
Alphabet
, i.e. if the
corresponding AlphabetContainer
is simple.isSimple
in class AlphabetContainer.AbstractAlphabetContainerParameterSet<AlphabetContainer>
true
if all positions use the same Alphabet
,
false
otherwisepublic StringBuffer toXML()
Storable
StringBuffer
of an
instance of the implementing class.toXML
in interface Storable
toXML
in class InstanceParameterSet<AlphabetContainer>
protected void fromXML(StringBuffer representation) throws NonParsableException
ParameterSet
ParameterSet
from the XML
representation as returned by ParameterSet.toXML()
.fromXML
in class InstanceParameterSet<AlphabetContainer>
representation
- the XML representation as StringBuffer
NonParsableException
- if the XML code could not be parsedParameterSet.toXML()
public int getPossibleLength()
AlphabetContainer.AbstractAlphabetContainerParameterSet
AlphabetContainer
that can be instantiated using
this ParameterSet
.getPossibleLength
in class AlphabetContainer.AbstractAlphabetContainerParameterSet<AlphabetContainer>
AlphabetContainer.getPossibleLength()
public String getInstanceName()
InstanceParameterSet
ParameterSet
.getInstanceName
in class InstanceParameterSet<AlphabetContainer>
public String getInstanceComment()
InstanceParameterSet
ParameterSet
.getInstanceComment
in class InstanceParameterSet<AlphabetContainer>