First difference: - SimpleFeatureIterator is just easier to type the FeatureIterator<SimpleFeature>
Second difference: - FeatureIterator can be closed; and it is obvious since there is a close() method - Iterator it a Java iterator; and it is not obvious that it MUST be closed using featureCollection.close( Iterator ) Iterator is a historical accident from when we were implementing java.util.Collection; we were copying what hibernate does (they also have iterators that must be closed after use). I think we all ran screaming when Java introduced the "for each" loop syntax that prevented libraries like ours from asking users to do something to iterators after use. Yes there are wrappers that will allow you to implement things just once (using what ever you have handy). This is just developers making things easy on ourselves; there is no special purpose. Last point of difference: - FeatureReader is like an iterator that throws exceptions - FeatureWriter is like an ListIterator in that content can be updated and removed Jody On 04/06/2010, at 4:08 PM, Michael Bedward wrote: > Hi folks, > > For my (occasional) javadoc editing I'm trying to get my head around > these two iterator lineages, but not with much success so far. > Essentially I don't understand why we have both and there seem to be > places in the library where one is disguised as another. Is this a > historical thing or do they have distinct purposes that I should > understand and document ? > > Michael > > ------------------------------------------------------------------------------ > ThinkGeek and WIRED's GeekDad team up for the Ultimate > GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the > lucky parental unit. See the prize list and enter to win: > http://p.sf.net/sfu/thinkgeek-promo > _______________________________________________ > Geotools-devel mailing list > Geotools-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/geotools-devel ------------------------------------------------------------------------------ ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo _______________________________________________ Geotools-devel mailing list Geotools-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-devel