We create collections all the time in Java, so making it easy was a priority in Eclipse Collections.
Facts about the Factories
I published three blogs on the factories available in Eclipse Collections. There are static factories for each type in Eclipse Collections for both object and primitive types. The following blogs have examples of mutable, immutable and method chaining factories.
As a matter of Factory — Part 1 (Mutable)
I’ve read a few blogs, articles and tweets over the past year about an upcoming feature in Java 9. Some of the articles…
As a matter of Factory — Part 2 (Immutable)
In part 1 of this blog series on Collection Factories, I illustrated how the factory classes in Eclipse Collections can…
As a matter of Factory — Part 3 (Method Chaining)
Learn how to add or remove elements from Java collections fluently by leveraging a few lesser known APIs in Eclipse…
Some developers prefer factory methods named “of”. Some developers prefer factory methods named “with”. Eclipse Collections provides support for both, except when it comes to method chaining, where “with” is the only option. Read the following blog to understand how symmetry helps validate that decision.
Here’s a Gist showing various examples of Object and Primitive factories in Eclipse Collections.