xxl.mathematica.map.KeySelect Maven / Gradle / Ivy
package xxl.mathematica.map;
import java.util.Map;
import java.util.function.Predicate;
/**
* 键选择
*/
public class KeySelect {
/**
* 键选择
*
* @param src
* @param p
* @param
* @param
* @return
*/
public static Map keySelect(Map src, Predicate p) {
return io.vavr.collection.HashMap.ofAll(src)
.filter(tuple2 -> p.test(tuple2._1()))
.toJavaMap();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy