-
Notifications
You must be signed in to change notification settings - Fork 476
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[COLLECTIONS-795] Add PairedIterator to allow iterating over different-types of iterators #412
base: master
Are you sure you want to change the base?
Conversation
@anantdamle I had a professor who stated there are only 3 valid limits in computing: zero, one, and many. Your solution zips two iterators, have you considered who to generalize that to many? Is that possible? |
src/main/java/org/apache/commons/collections4/IteratorUtils.java
Outdated
Show resolved
Hide resolved
src/test/java/org/apache/commons/collections4/IteratorUtilsTest.java
Outdated
Show resolved
Hide resolved
also fixed it in |
I think Its possible, and I have tried it, with a working prototype, though the interface becomes too complex as the consitutents can be of different kind (classes), so will have to use Object and class type, which in my opinion becomes a bad design.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
After running the tests, there are a number of issues with style. @anantdamle please run mvn
on your local branch and you should see a number of style issues as highlighted in the CI test runs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Plese fix error reported by CI test.
@Claudenw thanks for reviewing this, fixed checkstyle formatting issues. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@anantdamle
I added a few low-level comments.
src/main/java/org/apache/commons/collections4/PairedIterable.java
Outdated
Show resolved
Hide resolved
src/main/java/org/apache/commons/collections4/PairedIterable.java
Outdated
Show resolved
Hide resolved
src/main/java/org/apache/commons/collections4/iterators/PairedIterator.java
Outdated
Show resolved
Hide resolved
src/test/java/org/apache/commons/collections4/PairedIterableTest.java
Outdated
Show resolved
Hide resolved
83e673d
to
f0e50f8
Compare
@garydgregory made changes as requested and rebased on latest master |
fix review comments rebase on master fix checkstyle error use single class imports
f0e50f8
to
e100c13
Compare
Gentle bump up for review |
[COLLECTIONS-795] Add a new Iterator to allowing zipping over two iterators of different types
This is different from ZippingIterator which only permits sub-iterators of same type.
Created as #238 was overwhelmed with multiple commits due to inactivity for 2+ years.
@garydgregory can you please consider this proposal