[DATACMNS-940] Support for Javaslang collection types as query method return values Created: 21/Nov/16 Updated: 21/Dec/16 Resolved: 12/Dec/16
|Project:||Spring Data Commons|
|Fix Version/s:||1.13 RC1 (Ingalls), 2.0 M2 (Kay)|
|Reporter:||Darek Kaczynski||Assignee:||Oliver Gierke|
|Remaining Estimate:||Not Specified|
|Time Spent:||Not Specified|
|Original Estimate:||Not Specified|
Since Javaslang Option support was added in
|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.