Trying to implement this bit from biojava in anger ("How do count the residues in a sequence").
Count counts = new IndexedCount ((FiniteAlphabet)seq.getAlphabet());
//iterate through the Symbols in seq
for (Iterator i = seq.iterator();
i.hasNext();){
AtomicSymbol sym =
(AtomicSymbol)i.next();
counts.increaseCount (sym,1.0);
}It compiles but gives a class cast exception when I try to run it. Won't accept (AtomicSymbol)i.next();
It seems that seq.iterator() returns an iterator over Symbols and not AtomicSymbols?
any ideas?
thanks -Ben
_______________________________________________ Biojava-l mailing list - [EMAIL PROTECTED] http://biojava.org/mailman/listinfo/biojava-l
