Hi
How do I create a SymbolList of the symbol set: {A, B, C, D, E, F} (ordered)?
The following program produces a ClassCastException when run:

 
 import org.biojava.bio.symbol.*;
 import java.util.*;
  
  public class TestSuffixTree {
   
       public static void main (String[] args) {

                        SimpleAlphabet sa = getAlphabet ();
                        DummySymbolList dsl = new DummySymbolList (sa, 6);
                        SuffixTree st = new SuffixTree (sa);
                        st.addSymbols (dsl, 1);

           }
           public static SimpleAlphabet getAlphabet () {
                        HashSet hs = new HashSet ();
                        hs.add (new String("A"));
                        hs.add (new String("B"));
                        hs.add (new String("C"));
                        hs.add (new String("D"));
                        hs.add (new String("E"));
                        hs.add (new String("F"));
                        return new SimpleAlphabet (hs, "alpha");
           }
        }




    thanks.
        --st.
                                                                                       
                                                   
                                                                                       
                                                   }
_______________________________________________
Biojava-l mailing list  -  [EMAIL PROTECTED]
http://biojava.org/mailman/listinfo/biojava-l

Reply via email to