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

Introduce LinkedMap and LinkedSet interfaces #2707

Open
YuriyGorvitovskiy opened this issue Jan 31, 2022 · 2 comments
Open

Introduce LinkedMap and LinkedSet interfaces #2707

YuriyGorvitovskiy opened this issue Jan 31, 2022 · 2 comments

Comments

@YuriyGorvitovskiy
Copy link

I need in my code to distinguish LinkedMap and Map as a field declaration, and function parameter. Using LInkedHashMap is inconvenient, because required always to cast result of Value.toLinkedMap(...) method to LInkedHashMap. Having Intermediate interface LinkedMap like SortedMap, will be very helpful.

Similar applies to LinkedSet interface.

@wrandelshofer
Copy link

Maybe, you could use the upcoming Sequenced Collection interfaces, or make the new interfaces compatible with them?
JEP draft: Sequenced Collections

@YuriyGorvitovskiy
Copy link
Author

I would gladly use new Java interfaces, but io.vavr.collection.LinkedHashMap is not supporting it.
It will be great if LinkedHashMap implement LinkedMap interface or SequencedMap interface.

Similar io.vavr.collection.LinkedHashSet is implementing Set interface. So if you define LinkedSet or SequencedSet interface that will be implemented by LinkedHashSet, it will be great, also.

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

No branches or pull requests

3 participants