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 interface for observable lists #19

Open
tobiasdiez opened this issue Jul 16, 2020 · 4 comments
Open

Add stream interface for observable lists #19

tobiasdiez opened this issue Jul 16, 2020 · 4 comments
Labels
status: help wanted Extra attention is needed type: enhancement New feature or request

Comments

@tobiasdiez
Copy link
Owner

Idea: Have an interface that works similar to List.stream() but takes updates into account.

Similar implementation: https://github.com/griffon/griffon/blob/development/subprojects/griffon-javafx/src/main/java/griffon/javafx/collections/ObservableStream.java

@tobiasdiez tobiasdiez added type: enhancement New feature or request status: help wanted Extra attention is needed labels Jul 16, 2020
@piegamesde
Copy link

Is this something that requires some planning and careful implementation according to an interface? Or can we simply go ahead and add convenience methods to EasyObservableList inspired by this? (I'd really like EasyObservableList#map)

@tobiasdiez
Copy link
Owner Author

New convenient helper methods are always happily seen!

A proper stream-like interface is more work as one has to worry about chaining different operations. For the best performance, you don't want to create an intermediate list, and then listen to change events to this list; but you would like to listen to events of the original source and then transverse the stream-chain to only update the resulting list.

@piegamesde
Copy link

Ah, I see. So the difficulty does not lie in the API design, but in an efficient implementation. Thus, the methods can already be added with a naive implementation, and optimized afterwards?

@tobiasdiez
Copy link
Owner Author

Yes, exactly!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: help wanted Extra attention is needed type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants