|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.biojava.utils.AbstractChangeable
org.biojava.bio.symbol.AbstractAlphabet
org.biojava.bio.symbol.SingletonAlphabet
An alphabet that contains a single atomic symbol.
Nested Class Summary |
Nested classes inherited from class org.biojava.bio.Annotatable |
Annotatable.AnnotationForwarder |
Field Summary |
Fields inherited from interface org.biojava.bio.symbol.Alphabet |
EMPTY_ALPHABET, PARSERS, SYMBOLS |
Fields inherited from interface org.biojava.bio.Annotatable |
ANNOTATION |
Constructor Summary | |
SingletonAlphabet(AtomicSymbol sym)
|
Method Summary | |
void |
addSymbolImpl(AtomicSymbol sym)
|
protected boolean |
containsImpl(AtomicSymbol s)
|
java.util.List |
getAlphabets()
Return an ordered List of the alphabets which make up a compound alphabet. |
Annotation |
getAnnotation()
Should return the associated annotation object. |
java.lang.String |
getName()
Get the name of the alphabet. |
protected AtomicSymbol |
getSymbolImpl(java.util.List symList)
|
SymbolTokenization |
getTokenization(java.lang.String name)
Get a SymbolTokenization by name. |
java.util.Iterator |
iterator()
Retrieve an Iterator over the Symbols in this FiniteAlphabet. |
void |
removeSymbol(Symbol sym)
Remove a symbol from this alphabet. |
int |
size()
The number of symbols in the alphabet. |
Methods inherited from class org.biojava.bio.symbol.AbstractAlphabet |
addSymbol, contains, getAmbiguity, getAmbiguityImpl, getGapSymbol, getSymbol, putTokenization, readResolve, toString, validate |
Methods inherited from class org.biojava.utils.AbstractChangeable |
addChangeListener, addChangeListener, generateChangeSupport, getChangeSupport, hasListeners, isUnchanging, removeChangeListener, removeChangeListener |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.biojava.bio.symbol.FiniteAlphabet |
addSymbol |
Methods inherited from interface org.biojava.bio.symbol.Alphabet |
contains, getAmbiguity, getGapSymbol, getSymbol, validate |
Methods inherited from interface org.biojava.utils.Changeable |
addChangeListener, addChangeListener, isUnchanging, removeChangeListener, removeChangeListener |
Constructor Detail |
public SingletonAlphabet(AtomicSymbol sym)
Method Detail |
public java.util.List getAlphabets()
Alphabet
getAlphabets
in interface Alphabet
protected boolean containsImpl(AtomicSymbol s)
containsImpl
in class AbstractAlphabet
public java.lang.String getName()
Alphabet
getName
in interface Alphabet
public SymbolTokenization getTokenization(java.lang.String name) throws java.util.NoSuchElementException
Alphabet
Get a SymbolTokenization by name.
The parser returned is guaranteed to return Symbols and SymbolLists that conform to this alphabet.
Every alphabet should have a SymbolTokenzation under the name 'token' that uses the symbol token characters to translate a string into a SymbolList. Likewise, there should be a SymbolTokenization under the name 'name' that uses symbol names to identify symbols. Any other names may also be defined, but the behaviour of the returned SymbolTokenization is not defined here.
getTokenization
in interface Alphabet
getTokenization
in class AbstractAlphabet
java.util.NoSuchElementException
public java.util.Iterator iterator()
FiniteAlphabet
Each AtomicSymbol as for which this.contains(as) is true will be returned exactly once by this iterator in no specified order.
iterator
in interface FiniteAlphabet
public int size()
FiniteAlphabet
size
in interface FiniteAlphabet
public Annotation getAnnotation()
Annotatable
getAnnotation
in interface Annotatable
public void addSymbolImpl(AtomicSymbol sym) throws IllegalSymbolException
addSymbolImpl
in class AbstractAlphabet
IllegalSymbolException
public void removeSymbol(Symbol sym) throws IllegalSymbolException
FiniteAlphabet
If the symbol matches multiple AtomicSymbols, then each matching symbol it will be removed.
removeSymbol
in interface FiniteAlphabet
sym
- the Symbol to removeintGot
IllegalSymbolException
- if the symbol is null, or if for any reason
it can't be removedprotected AtomicSymbol getSymbolImpl(java.util.List symList) throws IllegalSymbolException
getSymbolImpl
in class AbstractAlphabet
IllegalSymbolException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |