Closed devinrsmith closed 8 years ago
I have updated the implementation to respect the Iterator contract along with some more tests. Do you mind reviewing it?
Looks very reasonable on first glance. I see it's very similar to guava's AbstractIterator. Thanks.
Yes, I took inspiration from AbstractIterator. Thanks for reporting the issue and reviewing the fix.
An iterators
hasNext
method should be idempotent. IE, the following two pieces of code should be functionally equivalent:EntryIterator doesn't allow
hasNext
to be called multiple times, and I've run into some bugs that were traced down to this issue.