On 21/07/15 15:38, A. Soroka wrote:
A question came up for me, as a Jena newbie, in the course of JENA-966:
"LazyIterator".
The type ExtendedIterator in jena-core is used widely through jena-core. It
features several convenient methods for use with iteration, like mapping
through functions, filtering, and concatenation.
The type Iter in jena-base is used widely through jena-base and jena-arq. It
features many convenient methods for use with iteration, like everything
ExtendedIterator does plus much more, (e.g. folding, selecting, reducing…).
What is the difference in use for these two types? Why are they distinct? Is
there some means by which it can be made clear when to use each and why? I
would be happy to write a simple class Javadoc for Iter (which currently has
none at all) to let folks know when to use it, if someone will explain that to
me.
---
A. Soroka
The University of Virginia Library
Iter is used in SDB and TDB as well where there are lots of iterators
for all sort so things.
ExtendedIterator only works with ExtendedIterator. Not everything
generates ExtendedIterators.
Iter is for working with java.util.Iterator; it is a different style
where the statics are more important than the class methods. It does
allow chaining but generally I don't think that style is very common in
the code base.
Andy