[DATACMNS-940] Support for Javaslang collection types as query method return values Created: 21/Nov/16  Updated: 21/Dec/16  Resolved: 12/Dec/16

Status: Closed
Project: Spring Data Commons
Component/s: None
Affects Version/s: None
Fix Version/s: 1.13 RC1 (Ingalls), 2.0 M2 (Kay)

Type: New Feature Priority: Minor
Reporter: Darek Kaczynski Assignee: Oliver Gierke
Resolution: Fixed Votes: 1
Labels: ingalls
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Last updater: Oliver Gierke
Sprint: Ingalls RC1


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?

Comment by Oliver Gierke [ 21/Nov/16 ]

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.

Comment by Darek Kaczynski [ 21/Nov/16 ]

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.

Comment by Oliver Gierke [ 12/Dec/16 ]

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

Generated at Mon Jul 16 14:26:40 UTC 2018 using JIRA 7.9.0#79000-sha1:3ca552e944c2fe83b21589bc06f155b9b428cc2b.