[COLLECTIONS-795] Add PairedIterator to allow iterating over different-types of iterators#412
[COLLECTIONS-795] Add PairedIterator to allow iterating over different-types of iterators#412anantdamle wants to merge 1 commit intoapache:masterfrom
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.
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.
Claudenw
left a comment
There was a problem hiding this comment.
Plese fix error reported by CI test.
|
@Claudenw thanks for reviewing this, fixed checkstyle formatting issues. |
garydgregory
left a comment
There was a problem hiding this comment.
@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