[Biojava-l] IntegerAlphabet IntegerSymbol

Mark Schreiber mark_s@sanger.otago.ac.nz
Mon, 22 Oct 2001 10:36:22 +1300 (NZDT)


On Sun, 21 Oct 2001, Thomas Down wrote:

> > Three options:
> > 1) Create a new SequenceFormat just for this, and if there will be no other
> > use of IntegerSymbolList perhaps this is the best way to go.
> > 
> > 2) Create an IntegerSymbolList that extends SimpleSymbolList overriding
> > seqString().
> > 
> > 3) (most invasive but perhaps cleanest) Change getToken() to return an
> > String, or adding toString() to Symbol and add a method paddedSeqString() to
> > AbstractSymbolList.
> 
> 4) get rid of getToken() completely, and change the way that sequences
>    get converted to strings -- replacing hardwired code in SymbolList
>    implementations with pluggable `stringifiers'.
> 
> This was the idea of my SymbolTokenizations patch which I posted
> a few days ago.  Certainly my view is that is provides a much
> cleaner framework for handling this kind of situtation, and I'd
> urge you to take a look.
> 
>     Thomas

I like option 4 although I would advocate deprecating getToken() instead
until everyone gets their applications up to speed with
SymbolTokenizations.

Mark

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Mark Schreiber			Ph: 64 3 4797875
Rm 218				email mark_s@sanger.otago.ac.nz
Department of Biochemistry	email m.schreiber@clear.net.nz
University of Otago		
PO Box 56
Dunedin
New Zealand
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~