-
Notifications
You must be signed in to change notification settings - Fork 170
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
Inconsistent interfaces between 'Paged' classes #1595
Comments
@SergiusAC I don't understand what exactly is the problem. The two todos seem to be two orthogonal concerns. The first one is about parameter order in the constructor and the second one is about removing a useless type parameter (generic) of the class. |
@victornoel the iterable.Paged constructor should take the parameter 'next' as 'Func<Iterable, Iterable>', it is mentioned in first todo. But the iterator.Paged constructor takes the corresponding parameter as 'Func<Iterator, Iterator>'. So we cannot invoke the iterator.Paged constructor and pass it the parameter 'next'. |
@SergiusAC well, this is the purpose of the task to find a solution. I see you refused the task, so maybe let it for the next person it will be assigned to. I don't see any problem with it, most of the Iterable of Cactoos are implemented by delegating to the corresponding Iterator implementation, so it should be doable. I don't have the solution exactly, but if I had, I would have done the job. If I understand well, it seems your question is about #1537, not about #1538 (which is just about switching two parameters in a constructor…), so I think next time, you can directly discuss it in the ticket of the problematic case :) |
@SergiusAC oh wait, I'm mistaken, the question is indeed about #1538, sorry. Anyway, my answer stands, we should find a way to take an iterable instead of an iterator in iterable.Paged. |
@SergiusAC re-reading my answers, maybe something is not clear:
I believe your question was thus about #1538. I propose that if all is clear to you, we close this ticket and I will add a link to this discussion in #1538 for the next person to tackle it :) or if you want to tackle it I can re-assign it to you with no problem :) |
@victornoel I think this ticket can be closed, because solution to make interfaces between the classes consistent can be done like this
Also, if it is possible, then re-assign #1538 to me again, please. |
@SergiusAC exactly, good solution |
Job |
Issue #1538 says next:
cactoos/src/main/java/org/cactoos/iterable/Paged.java
Lines 38 to 42 in 86ad37b
But this replacing is inconsistent with the interface in the next class:
cactoos/src/main/java/org/cactoos/iterator/Paged.java
Lines 42 to 67 in 86ad37b
This inconsistency prevents issues #1538 and #1537 from being completed.
The text was updated successfully, but these errors were encountered: