Skip to content

Commit

Permalink
Merge pull request #730 from nikhilnanivadekar/master
Browse files Browse the repository at this point in the history
Prepare for 10.0.0 release.
  • Loading branch information
donraab committed Jul 11, 2019
2 parents 50ea48f + fe69d64 commit a35f0f4
Show file tree
Hide file tree
Showing 9 changed files with 180 additions and 97 deletions.
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
~ Copyright (c) 2018 Goldman Sachs and others.
~ Copyright (c) 2019 Goldman Sachs and others.
~ All rights reserved. This program and the accompanying materials
~ are made available under the terms of the Eclipse Public License v1.0
~ and Eclipse Distribution License v. 1.0 which accompany this distribution.
Expand Down Expand Up @@ -39,7 +39,7 @@ Eclipse Collections is a comprehensive collections library for Java. The library
* [Eclipse Collections Katas](https://github.com/eclipse/eclipse-collections-kata), a fun way to help you learn idiomatic Eclipse Collections usage.
* Start Here - [Pet Kata](http://eclipse.github.io/eclipse-collections-kata/pet-kata/#/)
* Continue Here - [Company Kata](http://eclipse.github.io/eclipse-collections-kata/company-kata/#/)
* [Eclipse Collections Reference Guide](https://github.com/eclipse/eclipse-collections/blob/master/docs/guide.md) and [Javadoc](https://www.eclipse.org/collections/javadoc/9.2.0/overview-summary.html)
* [Eclipse Collections Reference Guide](https://github.com/eclipse/eclipse-collections/blob/master/docs/guide.md) and [Javadoc](https://www.eclipse.org/collections/javadoc/10.0.0/overview-summary.html)
* [Articles](https://github.com/eclipse/eclipse-collections/wiki/Articles) and [Blogs](https://medium.com/tag/eclipse-collections/latest)

## Acquiring Eclipse Collections
Expand All @@ -49,25 +49,25 @@ Eclipse Collections is a comprehensive collections library for Java. The library
<dependency>
<groupId>org.eclipse.collections</groupId>
<artifactId>eclipse-collections-api</artifactId>
<version>9.2.0</version>
<version>10.0.0</version>
</dependency>

<dependency>
<groupId>org.eclipse.collections</groupId>
<artifactId>eclipse-collections</artifactId>
<version>9.2.0</version>
<version>10.0.0</version>
</dependency>
```

### Gradle

```groovy
compile 'org.eclipse.collections:eclipse-collections-api:9.2.0'
compile 'org.eclipse.collections:eclipse-collections:9.2.0'
compile 'org.eclipse.collections:eclipse-collections-api:10.0.0'
compile 'org.eclipse.collections:eclipse-collections:10.0.0'
```

### OSGi Bundle
Eclipse software repository location: http://download.eclipse.org/collections/9.2.0/repository
Eclipse software repository location: http://download.eclipse.org/collections/10.0.0/repository


## Some Quick Examples
Expand Down Expand Up @@ -115,7 +115,7 @@ The lambda in the example above can also be replaced with a method reference.
```java
MutableList<String> lastNames = people.collect(Person::getLastName);
```
Eclipse Collections has support for both [Mutable](http://www.eclipse.org/collections/javadoc/9.2.0/org/eclipse/collections/api/collection/MutableCollection.html) and [Immutable](http://www.eclipse.org/collections/javadoc/9.2.0/org/eclipse/collections/api/collection/ImmutableCollection.html) collections, and the return types of methods are covariant. While the *collect* method on a *MutableList* returned a *MutableList*, the *collect* method on an *ImmutableList* will return an *ImmutableList*. Here we use the same [Lists](https://www.eclipse.org/collections/javadoc/9.2.0/org/eclipse/collections/impl/factory/Lists.html) factory to create an *ImmutableList*.
Eclipse Collections has support for both [Mutable](http://www.eclipse.org/collections/javadoc/10.0.0/org/eclipse/collections/api/collection/MutableCollection.html) and [Immutable](http://www.eclipse.org/collections/javadoc/10.0.0/org/eclipse/collections/api/collection/ImmutableCollection.html) collections, and the return types of methods are covariant. While the *collect* method on a *MutableList* returned a *MutableList*, the *collect* method on an *ImmutableList* will return an *ImmutableList*. Here we use the same [Lists](https://www.eclipse.org/collections/javadoc/10.0.0/org/eclipse/collections/impl/factory/Lists.html) factory to create an *ImmutableList*.

```java
ImmutableList<Person> people = Lists.immutable.with(
Expand All @@ -125,7 +125,7 @@ ImmutableList<Person> people = Lists.immutable.with(
ImmutableList<String> lastNames = people.collect(Person::getLastName);
Assert.assertEquals("Smith, Watson, Williams", lastNames.makeString());
```
Eclipse Collections has a [lazy API](http://www.eclipse.org/collections/javadoc/9.2.0/org/eclipse/collections/api/LazyIterable.html) as well, which is available by calling the method *asLazy*. The method *collect* will now return a *LazyIterable*. The *LazyIterable* that is returned does not evaluate anything until the call to a terminal method is made. In this case, the call to *makeString* will force the *LazyIterable* to collect the last names.
Eclipse Collections has a [lazy API](http://www.eclipse.org/collections/javadoc/10.0.0/org/eclipse/collections/api/LazyIterable.html) as well, which is available by calling the method *asLazy*. The method *collect* will now return a *LazyIterable*. The *LazyIterable* that is returned does not evaluate anything until the call to a terminal method is made. In this case, the call to *makeString* will force the *LazyIterable* to collect the last names.

```java
LazyIterable<String> lastNames = people.asLazy().collect(Person::getLastName);
Expand Down
123 changes: 96 additions & 27 deletions RELEASE_NOTE_DRAFT.md
Original file line number Diff line number Diff line change
@@ -1,37 +1,106 @@
10.0.0
====================

This is the 10.0.0 major release.
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
# New Functionality
-----------------

*

Backwards Breaking Changes
* 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.

*

Optimizations
-------------------

*

Bug Fixes
-------------------

*

Tech Debt Reduction
-------------------

*

Library Upgrades
-------------------

*
# 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
-----------------------------
Expand Down
18 changes: 10 additions & 8 deletions site/cn/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true"
aria-expanded="false">Javadoc<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="../javadoc/10.0.0">10.0.0</a></li>
<li><a href="../javadoc/9.2.0">9.2.0</a></li>
<li><a href="../javadoc/9.1.0">9.1.0</a></li>
<li><a href="../javadoc/9.0.0">9.0.0</a></li>
Expand Down Expand Up @@ -163,29 +164,29 @@ <h2 class="section-heading">Eclipse Collections入门须知</h2>
&lt;dependency&gt;
&lt;groupId&gt;org.eclipse.collections&lt;/groupId&gt;
&lt;artifactId&gt;eclipse-collections-api&lt;/artifactId&gt;
&lt;version&gt;9.2.0&lt;/version&gt;
&lt;version&gt;10.0.0&lt;/version&gt;
&lt;/dependency&gt;

&lt;dependency&gt;
&lt;groupId&gt;org.eclipse.collections&lt;/groupId&gt;
&lt;artifactId&gt;eclipse-collections&lt;/artifactId&gt;
&lt;version&gt;9.2.0&lt;/version>
&lt;version&gt;10.0.0&lt;/version>
&lt;/dependency&gt;</pre>
</div>
<div class="tab-pane fade" id="gradle">
<pre class="prettyprint">
compile 'org.eclipse.collections:eclipse-collections-api:9.2.0'
compile 'org.eclipse.collections:eclipse-collections:9.2.0'</pre>
compile 'org.eclipse.collections:eclipse-collections-api:10.0.0'
compile 'org.eclipse.collections:eclipse-collections:10.0.0'</pre>
</div>
<div class="tab-pane fade" id="ivy">
<pre class="prettyprint">
&lt;dependency org="org.eclipse.collections" name="eclipse-collections-api" rev="9.2.0" /&gt;
&lt;dependency org="org.eclipse.collections" name="eclipse-collections" rev="9.2.0" /&gt;</pre>
&lt;dependency org="org.eclipse.collections" name="eclipse-collections-api" rev="10.0.0" /&gt;
&lt;dependency org="org.eclipse.collections" name="eclipse-collections" rev="10.0.0" /&gt;</pre>
</div>
<div class="tab-pane fade" id="download">
<pre class="prettyprint">
<a target="_blank" href="http://mvnrepository.com/artifact/org.eclipse.collections/eclipse-collections-api/9.2.0">eclipse-collections-api-9.2.0.jar</a>
<a target="_blank" href="http://mvnrepository.com/artifact/org.eclipse.collections/eclipse-collections/9.2.0">eclipse-collections-9.2.0.jar</a></pre>
<a target="_blank" href="http://mvnrepository.com/artifact/org.eclipse.collections/eclipse-collections-api/10.0.0">eclipse-collections-api-10.0.0.jar</a>
<a target="_blank" href="http://mvnrepository.com/artifact/org.eclipse.collections/eclipse-collections/10.0.0">eclipse-collections-10.0.0.jar</a></pre>
</div>

</div>
Expand Down Expand Up @@ -566,6 +567,7 @@ <h3>贡献</h3>
</div>
<div class="col-lg-4 col-sm-4">
<h3>最新消息</h3>
<p class="regular">Eclipse Collections 10.0.0 版本<a href="https://github.com/eclipse/eclipse-collections/releases/tag/10.0.0">发布</a> <a class="light">(Jul 10th 2019)</a></p>
<p class="regular">Eclipse Collections 9.2.0 版本<a href="https://github.com/eclipse/eclipse-collections/releases/tag/9.2.0">发布</a> <a class="light">(May 20th 2018)</a></p>
<p class="regular">Eclipse Collections 9.1.0 版本<a href="https://github.com/eclipse/eclipse-collections/releases/tag/9.1.0">发布</a> <a class="light">(Jan 1st 2018)</a></p>
<p class="regular">Eclipse Collections 9.0.0 版本<a href="https://github.com/eclipse/eclipse-collections/releases/tag/9.0.0">发布</a> <a class="light">(Sep 21nd 2017)</a></p>
Expand Down
Loading

0 comments on commit a35f0f4

Please sign in to comment.