Skip to content

Conversation

@deadwolfst
Copy link

Completed by Iartsev Kirill

return new ReachIterable<R>() {
@Override
public boolean tryGet(Consumer<R> c) {
return ReachIterable.this.tryGet(e -> mapper.apply(e).tryGet(c));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incorrect. tryGet can call consumer only once.

@Override
public boolean tryGet(Consumer<T> c) {
return ReachIterable.this.tryGet(e -> {
if (p.test(e)) c.accept(e);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incorrect. tryGet should either call consumer or return false.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants