Eclipse Collections is a comprehensive collections library for Java. The library enables productivity and performance by delivering an expressive and efficient set of APIs and types. The iteration protocol was inspired by the Smalltalk collection framework, and the collections are compatible with the Java Collection Framework types.
The current GA release of Eclipse Collections (13.0.0) is compatible with Java 17+. Eclipse Collections 12.x is compatible with Java 11+, for projects that are not ready to upgrade to Java 17. Eclipse Collections is a part of the OpenJDK Quality Outreach program, and it is validated for different versions of the OpenJDK.
Why Eclipse Collections?
Productivity
Supports eager , lazy , serial and parallel iteration patterns
Rich , functional, and fluent APIs with eager methods available directly on collection types
Provides List , Set , Bag , Stack , Map , Multimap , [BiMap][BiMap], [Interval][Interval] object container types
Readable , [Mutable][MutableCollection], and [Immutable][ImmutableCollection] interfaces for each collection type with covariant return types
[Blog: Rich, Lazy, Mutable, Immutable interfaces in Eclipse collections][BlogRichLazyMutableImmutable]
Mutable and Immutable Collection [Factories][Factories]
[Blog series: As a matter of Factory][BlogAsAMatterOfFactory]
[Adapters][Adapters] and [Utility][Utilities] classes for JCF Types
[Blog: Iterate over any Iterable in Java][BlogIterateOverAnyIterableInJava]
Performance
Memory Efficient Containers
[Blog: UnifiedMap: How it works?][BlogUnifiedMapHowItWorks]
[Blog: UnifiedSet - The Memory Saver][BlogUnifiedSetTheMemorySaver]
Optimized Eager, [Lazy][LazyIterable] and [Parallel][ParallelIterable] APIs
[Blog: The unparalleled design of Eclipse Collections][BlogUnparalleledDesignOfEclipseCollections]
[Primitive][PrimitiveIterable] Collections for all primitive types
Provides List, Set, Bag, Stack, Map, Interval primitive container types
Maturity
Eclipse Collections has been actively developed and used in financial services applications since 2004
Eclipse Collections existed for a decade before concise lambda expressions were added in Java 8
[Blog: My ten-year quest for concise lambda expressions in Java][BlogLambdaExpressionsInJava]
Learn Eclipse Collections
Book : Eclipse Collections Categorically: Level up your programming game
Blog Series: [Getting Started with Eclipse Collections][BlogGettingStartedWithEclipseCollections]
Blog Series: [The missing Java data structures no one ever told you about][BlogTheMissingJavaDataStructures]
Blog: [Java has Streams. Do we need third-party collections?][BlogJavaHasStreamsDoWeNeedCollections]
Some Quick Code Examples
Eclipse Collections Katas , a fun way to help you learn idiomatic Eclipse Collections usage.
Eclipse Collections Reference Guide and Javadoc
Serializing Eclipse Collections with Jackson
Articles and Blogs
Some OSS projects that use Eclipse Collections
Neo4J , FINOS Legend , Reladomo , Liftwizard , Exchange Core , Dataframe EC , MapDB , Code Browser , Obevo , BNY Mellon Code Katas , Eclipse Nebula NatTable , Eclipse VIATRA , Jackson Datatypes Collections
If you work on an open source project that uses Eclipse Collections, let us know!
Eclipse Collections and JDK Compatibility Matrix
EC
JDK 5 - 7
JDK 8
JDK 9 - 10
JDK 11 - 14
JDK 15 - 16
JDK 17 - 25
7.x.x
✓
✓
8.x.x
✓
9.x.x
✓
✓
✓
10.x.x
✓
✓
✓
10.4.0
✓
✓
✓
✓
✓
11.x.x
✓
✓
✓
✓
✓
12.x.x
✓
✓
✓
13.x.x
✓
Please Note:
Eclipse Collections 13.x requires minimum Java 17 and is compatible with Java 17+.
Eclipse Collections 12.x requires minimum Java 11 and is compatible with Java 11+.
Acquiring Eclipse Collections
Maven
xml 复制
<dependency >
<groupId > org.eclipse.collections</groupId >
<artifactId > eclipse-collections-api</artifactId >
<version > 13.0.0</version >
</dependency >
<dependency >
<groupId > org.eclipse.collections</groupId >
<artifactId > eclipse-collections</artifactId >
<version > 13.0.0</version >
</dependency > Gradle
groovy 复制
implementation 'org.eclipse.collections:eclipse-collections-api:13.0.0'
implementation 'org.eclipse.collections:eclipse-collections:13.0.0'OSGi Bundle
How to Contribute
We welcome contributions! We accept contributions via pull requests here in GitHub. Please see How To Contribute to get started.
Additional information