Skip to content

ymwangzq/more-lambdas-java

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

more-lambdas

Build Status Maven Central

Some useful lambda implements for Java 8.

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.

About

Some useful collectors implements for Java 8.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 92.4%
  • Kotlin 7.6%