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

Support for Javaslang collection types as query method return values [DATACMNS-940] #1395

Closed
spring-projects-issues opened this issue Nov 21, 2016 · 3 comments
Assignees
Labels
type: enhancement
Milestone

Comments

@spring-projects-issues
Copy link

@spring-projects-issues spring-projects-issues commented Nov 21, 2016

Darek Kaczynski opened DATACMNS-940 and commented

Since Javaslang Option support was added in DATACMNS-937, would it also be possible to add support for Javaslang collections types as return values of query methods?


Backported to: 1.13 RC1 (Ingalls)

1 votes, 3 watchers

@spring-projects-issues
Copy link
Author

@spring-projects-issues spring-projects-issues commented Nov 21, 2016

Oliver Drotbohm commented

Is there a canonical place to read up on how to convert between native Java Collection types and Javaslang ones? What I am basically looking for is a description for all the convertible pairs of types from JDK collections to Javaslang ones.

The documentation is remarkably silent on this topic and only show very rudimental usage (e.g. List.of(1, 2)). The JavaDoc for List lists ofAll(…) but that method doesn't seem to be available for Set, Map etc

@spring-projects-issues
Copy link
Author

@spring-projects-issues spring-projects-issues commented Nov 21, 2016

Darek Kaczynski commented

This paragraph states all Javaslang collections are based on java.lang.Iterable and the source confirms. This seems like a good starting point to me.

Also javaslang.Value seems to have a lot of conversion methods from JavaSlang to JDK types. It also seems to be implemented by all main collection interfaces (Set, List, Map).

For Set and Map method ofAll(..) is defined on specific implementations of that interface, i.e. HashSet and HashMap

@spring-projects-issues
Copy link
Author

@spring-projects-issues spring-projects-issues commented Dec 12, 2016

Oliver Drotbohm commented

This should be in place. Feel free to give the snapshots a try

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

No branches or pull requests

2 participants