>>>>> "Zhen" == Ren, Zhen <[EMAIL PROTECTED]> writes:
Zhen> Hi, folks, How do I remove features from a sequence? The Zhen> interface FeatureHolder has a public method - public void Zhen> removeFeature(Feature f) throws ChangeVetoException. It is Zhen> also the superinterface for Sequence. However, I can not Zhen> use the method (compile error) as shown in the following Zhen> snippet. Please help. Thanks. [...] Hi, This will not compile because you have a typo at line 23: the method should be (as seq is a Sequence) seq.removeFeature(feature) and not seq.remove(feature) Note that when the typo is corrected the program will throw a java.util.ConcurrentModificationException as written because you are violating the Java Iterator contract. See the archive for messages from Mark and myself (in reply to Robert Stones) describing how to avoid this. hth, Keith -- - Keith James <[EMAIL PROTECTED]> bioinformatics programming support - - Pathogen Sequencing Unit, The Wellcome Trust Sanger Institute, UK - _______________________________________________ Biojava-l mailing list - [EMAIL PROTECTED] http://biojava.org/mailman/listinfo/biojava-l