xxl.mathematica.map.GroupBy Maven / Gradle / Ivy
package xxl.mathematica.map;
import java.util.List;
import java.util.Map;
import java.util.function.Function;
/**
* 分组
*/
public class GroupBy {
/**
* 分组
*
* @param
* @param
* @return
*/
public static Map> groupBy(List list, Function f) {
return io.vavr.collection.List.ofAll(list)
.groupBy(f)
.mapValues(io.vavr.collection.List::asJava)
.toJavaMap();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy