Java 8 and later
JavaDash, A Java utility library inspired by Lodash, providing helpful methods for common operations like manipulation, iteration, and more. This library is designed to provide similar functionality to Lodash's JavaScript methods but in a Java-friendly way.
This library is sponsored by ByPay Corporation.
You can include the library in your Java project by adding the appropriate dependency to your pom.xml
(if using Maven) or build.gradle
(if using Gradle).
<dependency>
<groupId>io.github.bypaycorporation</groupId>
<artifactId>javadash</artifactId>
<version>2.0.0</version>
</dependency>
implementation 'io.github.bypaycorporation:javadash:2.0.0'
import java.util.*;
import static io.javadash.CollectionUtils.chunk;
public class Main {
public static void main(String[] args) {
List<String> input = Arrays.asList("a", "b", "c", "d");
int size = 2;
List<List<String>> result = chunk(input, size);
System.out.println(result);
}
}
In addition to porting JavaDash's functionality, JavaDash includes matching unit tests.
For docs, license, tests, and downloads, see: https://github.com/bypaycorporation/javadash
Thanks to Van Tuan and Jake Moek and all contributors to JavaDash.