public class GenericComplementableDiscreteAlphabet extends ComplementableDiscreteAlphabet
| Modifier and Type | Class and Description |
|---|---|
static class |
GenericComplementableDiscreteAlphabet.GenericComplementableDiscreteAlphabetParameterSet
This class is used as container for the parameters of a
GenericComplementableDiscreteAlphabet. |
DiscreteAlphabet.DiscreteAlphabetParameterSetAlphabet.AlphabetParameterSet<T extends Alphabet>alphabet, caseInsensitive, parameters| Constructor and Description |
|---|
GenericComplementableDiscreteAlphabet(boolean caseInsensitive,
String[] alphabet,
int[] revComp)
The main constructor.
|
GenericComplementableDiscreteAlphabet(GenericComplementableDiscreteAlphabet.GenericComplementableDiscreteAlphabetParameterSet parameters)
This constructor creates a
GenericComplementableDiscreteAlphabet from a parameter set. |
GenericComplementableDiscreteAlphabet(StringBuffer representation)
The standard constructor for the interface
Storable. |
| Modifier and Type | Method and Description |
|---|---|
int |
getComplementaryCode(int code)
This method returns the code of the symbol that is the complement of the
symbol encoded by
code. |
Alphabet.AlphabetParameterSet |
getCurrentParameterSet()
Returns the
InstanceParameterSet that has been used to
instantiate the current instance of the implementing class. |
compareTo, getCode, getMaximalSymbolLength, getMin, getSymbolAt, ignoresCase, isEncodedSymbol, isSymbol, length, toString, toXMLcheckConsistencypublic GenericComplementableDiscreteAlphabet(StringBuffer representation) throws NonParsableException
Storable.
Creates a new GenericComplementableDiscreteAlphabet out of its XML
representation.representation - the XML representation as StringBufferNonParsableException - if the GenericComplementableDiscreteAlphabet could not be
reconstructed out of the XML representation (the
StringBuffer representation could
not be parsed)Storablepublic GenericComplementableDiscreteAlphabet(GenericComplementableDiscreteAlphabet.GenericComplementableDiscreteAlphabetParameterSet parameters) throws IllegalArgumentException, DoubleSymbolException
GenericComplementableDiscreteAlphabet from a parameter set.parameters - the set of parameters needed to create a GenericComplementableDiscreteAlphabetIllegalArgumentException - if space or tab will be used as symbolsDoubleSymbolException - if one of the symbols occurred more than oncepublic GenericComplementableDiscreteAlphabet(boolean caseInsensitive,
String[] alphabet,
int[] revComp)
throws DoubleSymbolException,
IllegalArgumentException
alphabet - the array of symbolscaseInsensitive - indicates if there will be no difference between lower case and
upper case letters/symbols in the alphabet (no case sensitivity)revComp - the array is used to provide the complementarity, revComp[i] contains the index of the complement of the i-th symbolIllegalArgumentException - if space or tab will be used as symbolsDoubleSymbolException - if one of the symbols occurred more than oncepublic int getComplementaryCode(int code)
ComplementableDiscreteAlphabetcode.getComplementaryCode in class ComplementableDiscreteAlphabetcode - the encoded symbolpublic Alphabet.AlphabetParameterSet getCurrentParameterSet() throws Exception
InstantiableFromParameterSetInstanceParameterSet that has been used to
instantiate the current instance of the implementing class. If the
current instance was not created using an InstanceParameterSet,
an equivalent InstanceParameterSet should be returned, so that an
instance created using this InstanceParameterSet would be in
principle equal to the current instance.getCurrentParameterSet in interface InstantiableFromParameterSetgetCurrentParameterSet in class DiscreteAlphabetInstanceParameterSetException - if the InstanceParameterSet could not be returned