Eclipse Collections v11.0.0.M1 Release Notes

Release Date: 2020-11-02 // over 3 years ago

Previous changes from v10.0.0

  • ๐Ÿš€ This is the 10.0.0 major release.
    ๐Ÿš€ Central theme of this release is addition of new APIs, features as requested by the community and decrease Tech Debt.
    ๐Ÿš€ This is our yearly major release.

    ๐Ÿ†• New Functionality

    • ๐Ÿ”„ Changed collection factories to be services that get loaded by the ServiceLoader in the API package.
    • ๐Ÿ”„ Changed RichIterable.groupByUniqueKey() so that it's target extends MutableMapIterable instead of MutableMap.
    • Implemented UnmodifiableMutableOrderedMap.
    • โž• Added <primitive1><primitive2>To<primitive1>Function.
    • โž• Added specialized MultiReader interfaces for List, Set and Bag to improve the interface hierarchy.
    • Implemented RichIterable.getAny().
    • Implemented RichIterable.countByEach().
    • Implemented RichIterable.toMap() with target.
    • Implemented RichIterable.toBiMap().
    • ๐Ÿšš Implemented MutableMapIterable.removeIf().
    • ๐Ÿšš Implemented MutableMapIterable.removeAllKeys().
    • Implemented Bag.collectWithOccurrences(ObjectIntToObjectFunction).
    • Implemented Multimap.collectKeyMultiValues().
    • Implemented MutableMultimap.getIfAbsentPutAll().
    • Implemented UnifiedSetWithHashingStrategy.addOrReplace(Object).
    • Implemented LazyIterate.cartesianProduct().
    • โž• Added override for replaceAll() and sort() on List implementations.
    • Implemented fromStream(Stream) on Mutable Collection Factories and Immutable Collection Factories.
    • Implemented ImmutableSortedBagMultimapFactory for Multimaps
    • Implemented HashingStrategySets.ofInitialCapacity() and HashingStrategySets.withInitialCapacity().
    • Implemented a Map factory method that takes a Map as a parameter
    • Implemented PrimitiveIterable.reduce() and PrimitiveIterable.reduceIfEmpty().
    • Implemented PrimitiveList.primitiveStream().
    • โšก๏ธ Implemented PrimitiveMap.updateValues().
    • Implemented factory methods to convert Iterable<BoxedPrimitive> to PrimitiveList, PrimitiveSet, PrimitiveBag, PrimitiveStack.
    • Implemented ofInitialCapacity() and withInitialCapacity() to Primitive Map Factories.
    • โž• Added ability to create ObjectPrimitiveMap, PrimitiveObjectMap, PrimitivePrimitiveMap from Iterable.

    Optimizations

    • Revamped and standardized resize/rehash for all primitive hash structures.

    ๐Ÿ› Bug Fixes

    • ๐Ÿ›  Fixed ImmutableDoubletonMap.flipUniqueValues() to throw exception when it has duplicates.
    • โž• Added missing toSentinel() calls in UnifiedSet.put(), UnifiedSetWithHashingStrategy.put().
    • โž• Added validation in FastList for initial capacity < 0.

    Tech Debt Reduction

    • ๐Ÿ›  Fixed SerializeTestHelper to use try-with-resources.
    • โฌ‡๏ธ Reduced duplicate readlock and writelock code in MultiReaderFastList, MultiReaderHashBag and MultiReaderUnifiedSet.
    • Replaced Apache commons-codec by Java 8 Base64 in Verify.
    • โž• Added missing bounded wildcards on generic types.
    • โž• Added wildcard types in MutableMapIterable.putPair(), MutableMapIterable.add(), MutableMultimap.putAllPairs() and MutableMultimap.add().
    • ๐Ÿ›  Fixed generics on MultiReaderFastList.newList().
    • โž• Added overrides for methods in MutableOrderedMap.
    • ๐Ÿ›  Fixed assignment order in constructor of IntIntervalSpliterator.
    • โœ‚ Removed unnecessary casts, redundant type arguments.
    • ๐Ÿ›  Fixed invalid cast in UnifiedSet.trimToSize().
    • ๐Ÿ”„ Changed Boxed result array to Primitive array to avoid unnecessary boxing in Primitive reduce.
    • ๐Ÿ›  Fixed several inspection violations, checkstyle violations and static analysis violations to increase code hygiene.
    • ๐Ÿ›  Fixed incorrect org.eclipse.collections.api.list api doc.
    • ๐Ÿ›  Fixed Javadoc lint errors, legacy Javadoc to update references to Eclipse Collections.
    • ๐Ÿšš Moved implementations for forEach(), toSortedListBy(), toSortedSetBy(), toSortedBagsBy(), toSortedMapBy(), toArray(), countBy(), countByWith(), selectUnique(), flatCollectWith(), reverseForEach(), reverseForEachWithIndex() as default methods to interfaces.
    • ๐Ÿšš Moved implementations for tap(), select(), selectWith(), reject(), rejectWith(), collect(), collectWith(), collectIf(), flatCollect(), toImmutable(), toReversed(), reverseThis(), shuffleThis() to MutableList as default implementations.
    • โœ‚ Removed default implementations for RichIterable.toSortedMapBy(), MutableListFactory.ofInitialCapacity(), selectUnique() from all Bag interfaces viz. Bag, ImmutableBag, ImmutableBagIterable, ImmutablePrimitiveBag, ImmutableSortedBag, MutableBag, MutableBagIterable, MutablePrimitiveBag, MutableSortedBag, PrimitiveBag, SortedBag, UnsortedBag. These were added to allow inclusion in minor release.
    • ๐Ÿ”„ Changed collection constructor factories from enums to singleton classes.
    • โฌ†๏ธ Upgraded CollectPrimitiveProcedure to be generated at build time by using stg file.
    • โž• Added SerializationTest for CollectPrimitiveProcedure.
    • โž• Added test coverage for IntInterval, MultiReaderHashBag, CharAdapter, CodePointAdapter, CodePointList, Lists, Primitive Factories, RichIterable.minOptional(), RichIterable.maxOptional(), RichIterable.zip(), MapIterable.detectOptional, MapIterable.detectWithOptional and MutableMapIterable.removeIf().
    • โšก๏ธ Updated IntListJMHTest to include benchmarks using IntStream.
    • โฌ‡๏ธ Reduced benchmark errors by consuming every object created in a benchmark to avoid DCE.

    โœ‚ Removed Functionality

    • โœ‚ Removed unused ant build module.
    • โœ‚ Removed deprecated classes marked for removal: SummaryStatistics, SerializableIntSummaryStatistics, SerializableLongSummaryStatistics, and SerializableDoubleSummaryStatistics.

    ๐Ÿ— Build Changes

    • โž• Added Javadoc build for pull requests to ensure correct CI.
    • โฌ†๏ธ Upgraded maven plugins for build time stability.
    • โšก๏ธ Updated Tycho Version to 1.3.0.
    • ๐Ÿ”ง Configured Travis to run maven using the maven wrapper.
    • ๐Ÿ›  Fixed 'maven install' for newer versions of Java by using maven profiles to link modules with the version of Java that can build them.
    • ๐Ÿ›  Fixed maven pluginRepositories settings to include maven central.
    • ๐Ÿ›  Fixed Travis builds to cache the maven local cache without including Eclipse Collections jars.
    • โœ‚ Removed EclipseCollectionsCodeGenerator Task.
    • โœ‚ Removed unused dependencies from maven build.
    • โœ‚ Removed obsolete maven prerequisites.
    • Customized IntelliJ maven argline settings.
    • ๐Ÿ”ง Turned on Eclipse Collections Code Generator plugin on configuration for Eclipse IDE.

    ๐Ÿ’ฅ Breaking Changes

    โš  Warning: These changes are already mentioned above. The list below might not be exhaustive, make sure to test your application and usages to verify.

    • ๐Ÿ”„ Changed groupByUniqueKey() so that it's target extends MutableMapIterable instead of MutableMap. This breaks binary compatibility.
    • โž• Added missing bounded wildcards on generic types.
    • โœ‚ Removed deprecated classes marked for removal: SummaryStatistics, SerializableIntSummaryStatistics, SerializableLongSummaryStatistics, and SerializableDoubleSummaryStatistics.
    • โœ‚ Removed default implementations for RichIterable.toSortedMapBy(), MutableListFactory.ofInitialCapacity(), selectUnique() from all Bag interfaces viz. Bag, ImmutableBag, ImmutableBagIterable, ImmutablePrimitiveBag, ImmutableSortedBag, MutableBag, MutableBagIterable, MutablePrimitiveBag, MutableSortedBag, PrimitiveBag, SortedBag, UnsortedBag. These were added to allow inclusion in minor release.
    • Upgraded CollectPrimitiveProcedure to be generated at build time by using stg file. This might break serialization.
    • โž• Added validation in FastList for initial capacity < 0.
    • ๐Ÿ›  Fixed ImmutableDoubletonMap.flipUniqueValues() to throw exception when it has duplicates.

    Acquiring Eclipse Collections

    Maven

    \<dependency\> \<groupId\>org.eclipse.collections\</groupId\> \<artifactId\>eclipse-collections-api\</artifactId\> \<version\>10.0.0\</version\> \</dependency\> \<dependency\> \<groupId\>org.eclipse.collections\</groupId\> \<artifactId\>eclipse-collections\</artifactId\> \<version\>10.0.0\</version\> \</dependency\> \<dependency\> \<groupId\>org.eclipse.collections\</groupId\> \<artifactId\>eclipse-collections-testutils\</artifactId\> \<version\>10.0.0\</version\> \<scope\>test\</scope\> \</dependency\> \<dependency\> \<groupId\>org.eclipse.collections\</groupId\> \<artifactId\>eclipse-collections-forkjoin\</artifactId\> \<version\>10.0.0\</version\> \</dependency\>
    

    Gradle

    compile 'org.eclipse.collections:eclipse-collections-api:10.0.0'compile 'org.eclipse.collections:eclipse-collections:10.0.0'testCompile 'org.eclipse.collections:eclipse-collections-testutils:10.0.0'compile 'org.eclipse.collections:eclipse-collections-forkjoin:10.0.0'
    

    Ivy

    \<dependency org="org.eclipse.collections" name="eclipse-collections-api" rev="10.0.0" /\> \<dependency org="org.eclipse.collections" name="eclipse-collections" rev="10.0.0" /\> \<dependency org="org.eclipse.collections" name="eclipse-collections-testutils" rev="10.0.0" /\> \<dependency org="org.eclipse.collections" name="eclipse-collections-forkjoin" rev="10.0.0"/\>
    

    OSGi Bundle

    Eclipse software repository location: http://download.eclipse.org/collections/10.0.0/repository