Primitive Set Operations in Eclipse Collections — Part 2

In Eclipse Collections 11.0 release, we will have the following Set operations union, intersect, difference, symmetricDifference, isSubsetOf, isProperSubsetOf, cartesianProducton primitive collections.

Set Operations that will be available on primitive sets in Eclipse Collections 11.0.

These APIs are already available on Sets on the object side, but my goal was to implement these methods for Sets supporting primitive types namely IntSet, LongSet, ShortSet, DoubleSet, FloatSet, CharSet, BooleanSet, ByteSet. Additionally, the above operations will be available in both mutable and immutable interfaces.

I covered the first three operations (union, intersect and difference) in this blog. …

Picture captured by Karthik Uppuluri on Septemeber 7th, 2020

Eclipse Collections is an Open Source Java Collections library with 16+ years in the making. As we start this new year 2021, many feelings come to mind. I started my Open Source journey in 2020 by contributing to Eclipse Collections. In November 2020, I was elected as a committer. I am filled with gratitude and humility for having being given this opportunity, platform, and more importantly, support and kindness from the Eclipse Collections team.

We at Eclipse Collections are thankful to all our contributors and supporters who played an integral role in keeping this Open Source library vibrant and successful…

Eclipse Collections has a rich assortment of data structures, and one of them is a Set. Recently, I worked on an issue to implement union, intersect and difference operations in sets for primitive types.

The next few sections will cover each operation’s objective, design considerations, and code implementation. The last section will cover the takeaways.

Union — What does this operation do?

Method signature: setA.union(setB)

union as the name indicates, it takes elements from two sets and combines them into one.

Photo by Adrian Korte on Unsplash

Ever since Java announced their 6-month release cycle, there is excitement around exploring new features and even more so with preview features.

See JEP-12 for the definition of the preview feature.

A preview feature is a new feature of the Java language, Java Virtual Machine, or Java SE API that is fully specified, fully implemented, and yet impermanent. It is available in a JDK feature release to provoke developer feedback based on real world use; this may lead to it becoming permanent in a future Java SE Platform.

One such noteworthy preview feature called “Records” was introduced as part of…

My contributions graph

50 Open Source Contributions in 2020!

It may not seem like a lot. In fact, the contributions themselves were pretty minor. But to me, it is 50 times or more I stayed away from Netflix, Youtube, and the likes to work on an Open Source project. Don’t get me wrong, I have binge-watched a couple of TV shows these past few months. But I can say with certainty that working on an Open Source project is just as fun as binge-watching a full season of Stranger Things.

Working on an Open Source project was a personal goal of mine. My motivations were to explore a different…

Sirisha Pratha

Java Developer, Open Source contributor, Committer for the Eclipse Collections OSS project( Opinions are my own.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store