Skip to content
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

Add stream support to Scanners #867

Closed
keith-turner opened this issue Jun 2, 2017 · 1 comment
Closed

Add stream support to Scanners #867

keith-turner opened this issue Jun 2, 2017 · 1 comment
Milestone

Comments

@keith-turner
Copy link
Contributor

It would be really nice if the fluo scanners had methods to return java streams.

@keith-turner keith-turner added this to the 1.2.0 milestone Jun 2, 2017
@mikewalch
Copy link
Member

It looks like what is needed for this issue is a stream() method should be added to CellScanner, ColumnScanner, RowScanner like below:

public interface RowScanner extends Iterable<ColumnScanner> {

  default Stream<ColumnScanner> stream() {
    return StreamSupport.stream(spliterator(), false);
  }

  default Stream<ColumnScanner> parallelStream() {
    return StreamSupport.stream(spliterator(), true);
  }
}

For more information on streams, check out this stackoverflow question and this tutorial

cjmctague added a commit to cjmctague/fluo that referenced this issue Jul 21, 2017
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

No branches or pull requests

2 participants