Blog Series: Getting Started with Eclipse Collections

Donald Raab
4 min readMay 17, 2023

--

Every day we get to learn something new and useful, is a good day.

Start Here

You are here. Welcome to the first day of learning a new way of coding with collections in Java using Eclipse Collections. Today is going to be a good day. Thank you for letting my series of four blogs on Getting Started with Eclipse Collections be a part of your day.

Read the blogs in this series (linked below) at a pace that you find comfortable. Jump around, skip sections… find your own path that works best for learning. The blogs in this series are a comprehensive beginner’s reference guide. I highly recommend complementing the knowledge you obtain in these blogs with hands-on practice using the Eclipse Collections Kata. The information contained in these blogs will help you learn many of the basic usage patterns of the Eclipse Collections library. Alternating between the theory in the blogs, and the practice in the katas will help you hone your skills, and strengthen your knowledge and understanding.

These blogs are a mile marker on a journey I started back in 2004. Twenty years ago, I was a Technical Architect in Goldman Sachs who had decided to move with his family to London on a year long business trip. I had some problems to solve while I was working in London, and I worked hard to solve them. I did not expect to return from that trip with the beginnings of a new collections library in Java, but that is exactly what happened. What you will see in the blogs that follow is the evolution of a library that was developed to satisfy the real needs of large scale enterprise applications developed in the back office of Goldman Sachs. It would take a full eight years for anyone outside of Goldman Sachs to be able to see and use this code as an open source library in their own applications. In 2012, what we now know as Eclipse Collections was originally open sourced as GS Collections.

And here you are. Waiting to learn. Enough back story. Let’s get you started. The following sections have links to the blogs in the series.

Part 1 — Creating Collections

Know why you need the Eclipse Collections — the new types it offers and how it enhances other familiar Collection types. In this blog, you will learn how to create Lists, Sets, Bags, Stacks, Maps and other collection types in Eclipse Collections.

Part 2 — Adding to and removing from Collections

If you thought you knew everything you needed to know about adding to and removing from collections, then you need to read this blog. Learn about the covariantly overridden methods with, without, withAll, withoutAll, along with other specialized methods.

Part 3 — Converting between Collection types

Are you satisfied with the method toList on Java’s Stream ? Do you find yourself longing for converter methods named toSet, toMap as well? Then read this blog and find out just how many converter methods you have been living without.

Part 4 — Processing information in Collections

Collections contain information in them, and they provide methods that you can use to process that information. This blog covers the methods forEach, select, reject, partition, collect, detect, any/all/noneSatisfy and count. There also are fun FizzBuzz (🥤🐝) and Lego Brick (🔴🔴🔴) examples using emojis in code to help demonstrate these methods.

Further Reading

If you’re reading this right now, then you have found my Medium Account blog. I have been blogging about Eclipse Collections for almost six years. There are over 150 blogs on my Medium Account. I will share the blogs below that I think will help you the most if you want to continue your journey of learning Eclipse Collections.

Blog Series: The missing Java data structures no one ever told you about

These are more advanced topics about Eclipse Collections. The blogs in this series will you help understand how Eclipse Collections expands far beyond what is available in the standard Java Collections library.

Java Streams are great but it’s time for better Java Collections

Java Streams were a great addition to the standard library, but there is so much more that is missing from Java Collections. Read this blog to learn more.

Ten reasons to use Eclipse Collections

Have a great Journey!

Thank you for taking the time to read! I hope you have learned something new and useful. Good luck on your journey, and I hope you will share any new found knowledge with others you encounter along the way.

I am the creator of and a Committer for the Eclipse Collections OSS project which is managed at the Eclipse Foundation. Eclipse Collections is open for contributions.

--

--

Donald Raab
Donald Raab

Written by Donald Raab

Java Champion. Creator of the Eclipse Collections OSS Java library (https://github.com/eclipse/eclipse-collections). Inspired by Smalltalk. Opinions are my own.

No responses yet