On 11 Jan 2006, at 10:45, Christian Köberle wrote:

Hi,

exists a way to get Features from a FeatureHolder sorted  by Location?

You guarantee a specific iteration order from a FeatureHolder (unless you write your own implementation). You can, however, dump some features into a List or Set then sort them there.

          FeatureHolder fh = ...;
          List l = new ArrayList();
          for (Iterator i = fh.features(); i.hasNext(); ) {
              l.add(i.next());
          }
          Collections.sort(l, Feature.byLocationOrder);


Thomas.
_______________________________________________
Biojava-l mailing list  -  Biojava-l@biojava.org
http://biojava.org/mailman/listinfo/biojava-l

Reply via email to