GS Collections 4.0 Released

Raab, Donald Donald.Raab at gs.com
Mon Sep 23 11:56:34 PDT 2013


The JCF branch of the kata has been updated.  You will see two examples using groupingBy and summingDouble now.

https://github.com/goldmansachs/gs-collections-kata/blob/solutions-java8-jcf/src/test/java/com/gs/collections/kata/Exercise9Test.java

Thanks,
Don

_____________________________________________
From: Raab, Donald [Tech]
Sent: Saturday, September 21, 2013 2:10 PM
To: lambda-libs-spec-experts at openjdk.java.net
Cc: Motlin, Craig P. [Tech]; Hindupur, Bhavana [Tech]; Zakharov, Vladimir [Tech]
Subject: GS Collections 4.0 Released


I thought I would update this group quickly on our latest release of GS Collections.  Release notes are here:

https://github.com/goldmansachs/gs-collections/releases

We now have full support for all primitive types including mutable, immutable, unmodifiable, synchronized and lazy across primitive lists, sets, maps, bags and stacks.  We've also added a new feature to our primitive sets called "freeze".  We may add this feature in the future to our other primitive and object containers if developers request it.  You can transform from an object collection to any primitive type either eagerly or lazily, and back again.  We do not support primitive to primitive type conversions yet, but may add those in a future release if folks have a need for them.

I've updated our Java 8 kata solutions to leverage the latest features in GSC 4.0.  We've also discovered a neat way to parameterize a method reference using our optimized (but lesser known) "With" methods (e.g. selectWith, collectWith, anySatisfyWith, etc.).  You can see two examples of this in the kata solutions.  Method references are such a cool feature, our tendency is to want to use them as much as possible.  Being able to parameterize a method reference gives us even more leverage of this wonderful Java 8 feature.  Kudos and thanks to Oracle and the Java 8 Lambda developers on building this most excellent feature.

https://github.com/goldmansachs/gs-collections-kata/tree/solutions-java8

Parameterized method reference examples linked below.  Look for selectWith example in the getLondonCustomers() test and the detectWith example in whoSuppliesSandwichToaster() test.

https://github.com/goldmansachs/gs-collections-kata/blob/solutions-java8/src/test/java/com/gs/collections/kata/Exercise1Test.java
https://github.com/goldmansachs/gs-collections-kata/blob/solutions-java8/src/test/java/com/gs/collections/kata/Exercise5Test.java

We've added two new tests to our kata as well that leverage our new aggregateBy api on RichIterable.  The new tests are totalOrderValuesByCity() and totalOrderValuesByItem().

https://github.com/goldmansachs/gs-collections-kata/blob/solutions-java8/src/test/java/com/gs/collections/kata/Exercise9Test.java

I am in the process of porting the aggregation tests to use Java 8 Streams on the JCF solutions branch.  I should hopefully have that done and pushed to GitHub this week.

Cheers,
Don

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/lambda-libs-spec-experts/attachments/20130923/a3bddf9c/attachment.html 


More information about the lambda-libs-spec-experts mailing list