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.data.alphabets
Class DNAAlphabet

    java.lang.Object
      de.jstacs.data.Alphabet
          de.jstacs.data.alphabets.DiscreteAlphabet
              de.jstacs.data.alphabets.ComplementableDiscreteAlphabet
                  de.jstacs.data.alphabets.DNAAlphabet

All Implemented Interfaces:
  InstantiableFromParameterSet, Storable, Comparable<Alphabet>

    public final class DNAAlphabet

extends ComplementableDiscreteAlphabet

This class implements the discrete alphabet that is used for DNA.

Author:
  Jan Grau, Jens Keilwagen

Nested Class Summary
`static class` | `DNAAlphabet.DNAAlphabetParameterSet` The parameter set for a `DNAAlphabet`.

Nested classes/interfaces inherited from class de.jstacs.data.alphabets.DiscreteAlphabet
`DiscreteAlphabet.DiscreteAlphabetParameterSet`

Nested classes/interfaces inherited from class de.jstacs.data.Alphabet
`Alphabet.AlphabetParameterSet`

Field Summary

Fields inherited from class de.jstacs.data.alphabets.DiscreteAlphabet
`alphabet, caseInsensitive, parameters`

Constructor Summary
`DNAAlphabet()` The main constructor.
`DNAAlphabet(DNAAlphabet.DNAAlphabetParameterSet parameters)` The constructor for the `InstantiableFromParameterSet` interface.
`DNAAlphabet(StringBuffer representation)` The standard constructor for the interface `Storable`.

Method Summary
`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.

Methods inherited from class de.jstacs.data.alphabets.DiscreteAlphabet
`compareTo, getCode, getMaximalSymbolLength, getMin, getSymbolAt, ignoresCase, isEncodedSymbol, isSymbol, length, toString, toXML`

Methods inherited from class de.jstacs.data.Alphabet
`checkConsistency`

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

Constructor Detail

### DNAAlphabet

    public DNAAlphabet(StringBuffer representation)
                throws NonParsableException

  The standard constructor for the interface `Storable`. Creates a new `DNAAlphabet` out of its XML representation.

  Parameters:
    `representation` - the XML representation as `StringBuffer`
  Throws:
    `NonParsableException` - if the `DNAAlphabet` could not be reconstructed out of the XML representation (the `StringBuffer` `representation` could not be parsed)
  See Also:
    `ComplementableDiscreteAlphabet.ComplementableDiscreteAlphabet(StringBuffer)`, `Storable`

### DNAAlphabet

    public DNAAlphabet(DNAAlphabet.DNAAlphabetParameterSet parameters)
                throws IllegalArgumentException,
                       DoubleSymbolException

  The constructor for the `InstantiableFromParameterSet` interface. Creates a new `DNAAlphabet` from a given parameter set.

  Parameters:
    `parameters` - the given set of parameters
  Throws:
    `IllegalArgumentException` - if space or tab will be used as symbols
    `DoubleSymbolException` - if one of the symbols occurred more than once
  See Also:
    `DNAAlphabet()`

### DNAAlphabet

    public DNAAlphabet()
                throws DoubleSymbolException,
                       IllegalArgumentException

  The main constructor. Creates a new `DNAAlphabet` with the standard DNA-alphabet ("A", "C", "G", "T").

  Throws:
    `DoubleSymbolException` - if one of the symbols occurred more than once
    `IllegalArgumentException` - if space or tab will be used as symbols
  See Also:
    `ComplementableDiscreteAlphabet.ComplementableDiscreteAlphabet(boolean, String...)`

Method Detail

### getComplementaryCode

    public int getComplementaryCode(int code)

  Description copied from class: `ComplementableDiscreteAlphabet`
  This method returns the code of the symbol that is the complement of the symbol encoded by `code`.

  Specified by:
    `getComplementaryCode` in class `ComplementableDiscreteAlphabet`
  Parameters:
    `code` - the encoded symbol
  Returns:
    the code of the complement

### getCurrentParameterSet

    public Alphabet.AlphabetParameterSet getCurrentParameterSet()
                                                         throws Exception

  Description copied from interface: `InstantiableFromParameterSet`
  Returns the `InstanceParameterSet` 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.

  Specified by:
    `getCurrentParameterSet` in interface `InstantiableFromParameterSet`
  Specified by:
    `getCurrentParameterSet` in class `ComplementableDiscreteAlphabet`
  Returns:
    the current `InstanceParameterSet`
  Throws:
    `Exception` - if the `InstanceParameterSet` could not be returned

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