jbil.sequence
Class DNAAlphabet

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<Symbol>
          extended by jbil.sequence.Alphabet
              extended by jbil.sequence.DNAAlphabet
All Implemented Interfaces:
java.lang.Iterable<Symbol>, java.util.Collection<Symbol>, java.util.List<Symbol>

public class DNAAlphabet
extends Alphabet

Class representing the basic DNA nucleotide alphabet {a,g,c,t}.

Author:
Paulo G. S. da Fonseca

Field Summary
static AtomicCharSymbol a
          The atomic 'a' symbol
static AtomicCharSymbol c
          The atomic 'c' symbol
static java.lang.String DNA_ALPHABET
          The alphabet name constant
static AtomicCharSymbol g
          The atomic 'g' symbol
static AtomicCharSymbol t
          The atomic 't' symbol
 
Constructor Summary
DNAAlphabet()
          Creates a DNA {a,g,c,t} alphabet.
 
Method Summary
 AtomicCharSymbol a()
           
 AtomicCharSymbol c()
           
 AtomicCharSymbol g()
           
 Symbol get(char ch)
          Gets a symbol from its character representation.
 AtomicCharSymbol t()
           
 
Methods inherited from class jbil.sequence.Alphabet
add, contains, get, indexOf, intersection, isLocked, lock, remove, set, size
 
Methods inherited from class java.util.AbstractList
add, addAll, clear, equals, hashCode, iterator, lastIndexOf, listIterator, listIterator, subList
 
Methods inherited from class java.util.AbstractCollection
addAll, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
addAll, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray
 

Field Detail

DNA_ALPHABET

public static final java.lang.String DNA_ALPHABET
The alphabet name constant

See Also:
Constant Field Values

a

public static final AtomicCharSymbol a
The atomic 'a' symbol


g

public static final AtomicCharSymbol g
The atomic 'g' symbol


c

public static final AtomicCharSymbol c
The atomic 'c' symbol


t

public static final AtomicCharSymbol t
The atomic 't' symbol

Constructor Detail

DNAAlphabet

public DNAAlphabet()
Creates a DNA {a,g,c,t} alphabet.

Method Detail

a

public AtomicCharSymbol a()
Returns:
the a

c

public AtomicCharSymbol c()
Returns:
the c

g

public AtomicCharSymbol g()
Returns:
the g

t

public AtomicCharSymbol t()
Returns:
the t

get

public Symbol get(char ch)
Gets a symbol from its character representation.

Parameters:
ch - The character representation of the symbol.
Returns:
The corresponding atomic symbol or null if ch is not in {'a','g','c','t'}.