GS Collections 4.0 Released
Donald.Raab at gs.com
Sat Sep 21 11:09:32 PDT 2013
I thought I would update this group quickly on our latest release of GS Collections. Release notes are here:
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.
Parameterized method reference examples linked below. Look for selectWith example in the getLondonCustomers() test and the detectWith example in whoSuppliesSandwichToaster() test.
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().
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.
More information about the lambda-libs-spec-observers