IteratorIterator deprecated

2017-12-02 Thread Claude Warren
I know that the IteratorIterator class was deprecated some time ago in favor of WrappedIterator.createIteratorIterator(). However they have different performance characteristics. the original IteratorIterator, did not call iter.next() on the base iterator until it was needed.

Re: IteratorIterator deprecated

2017-12-02 Thread ajs6f
Claude-- have you looked at the Guava machinery underneath Iterators.concat(...)? I _believe_ that it is fully lazy, although I haven't looked at it in a while. https://google.github.io/guava/releases/19.0/api/docs/com/google/common/collect/Iterators.html#concat(java.util.Iterator)

Re: CMS diff: Jena Full Text Search

2017-12-02 Thread Andy Seaborne
On 01/12/17 16:26, Chris Tomlinson wrote: Hi Andy, The current commit is cumulative. The commit just prior to this one addressed all of Osma’s comments - which included my raising JENA-1437 and JENA-1438

Re: IteratorIterator deprecated

2017-12-02 Thread Andy Seaborne
Abstract LazyIterator.create() is called when the first hasNext or next is called. Hence the expensive iterator is not made until first use. Having LazyIterator(Supplier) supplier) is a more modern style than subclassing. Aside: our own "Creator" interface has an explicit "new each call"