Some useful collectors implements for Java 8.
Clone or download

README.md

more-lambdas Build Status

Some useful lambda implements for Java 8.

Get Started

<dependency>
    <groupId>com.github.phantomthief</groupId>
    <artifactId>more-lambdas</artifactId>
    <version>0.1.15</version>
</dependency>

Usage

advanced distinct

List<String> list = ....;
List<String> result = list.stream() //
	.filter(MorePredicates.distinctUsing(Object::hashCode)) // distinct using hashCode
	.collect(Collectors.toList());

more collectors

Map<Integer, String> map = ...;
map.entrySet().stream() //
	... // some ops
	.collect(MoreCollectors.toMap()); // no need to map key and value again if it's an entry stream.

also, there is simple HPPC support in MoreCollectors.