Uses of Interface
org.miaixz.bus.core.center.function.PredicateX
Packages that use PredicateX
Package
Description
函数封装
接口灵感来自于ActFramework
一个函数接口代表一个一个函数,用于包装一个函数为对象
在JDK8之前,Java的函数并不能作为参数传递,也不能作为返回值存在,此接口用于将一个函数包装成为一个对象,从而传递对象
提供通用树生成,特点:
-
Uses of PredicateX in org.miaixz.bus.core.center.function
Methods in org.miaixz.bus.core.center.function that return PredicateXModifier and TypeMethodDescriptiondefault PredicateX<T> PredicateX.and(PredicateX<? super T> other) Returns a composed predicate that represents a short-circuiting logical AND of this predicate and another.static <T> PredicateX<T> Returns a predicate that tests if two arguments are equal according toObjects.equals(Object, Object).static <T> PredicateX<T> PredicateX.multiAnd(PredicateX<T>... predicates) multistatic <T> PredicateX<T> PredicateX.multiOr(PredicateX<T>... predicates) multidefault PredicateX<T> PredicateX.negate()Returns a predicate that represents the logical negation of this predicate.default PredicateX<T> PredicateX.or(PredicateX<? super T> other) Returns a composed predicate that represents a short-circuiting logical OR of this predicate and another.Methods in org.miaixz.bus.core.center.function with parameters of type PredicateXModifier and TypeMethodDescriptiondefault PredicateX<T> PredicateX.and(PredicateX<? super T> other) Returns a composed predicate that represents a short-circuiting logical AND of this predicate and another.static <T> PredicateX<T> PredicateX.multiAnd(PredicateX<T>... predicates) multistatic <T> PredicateX<T> PredicateX.multiOr(PredicateX<T>... predicates) multidefault PredicateX<T> PredicateX.or(PredicateX<? super T> other) Returns a composed predicate that represents a short-circuiting logical OR of this predicate and another. -
Uses of PredicateX in org.miaixz.bus.core.tree
Methods in org.miaixz.bus.core.tree with parameters of type PredicateXModifier and TypeMethodDescriptionBeanTree.filter(List<T> tree, PredicateX<T> condition) 树的过滤操作,本方法一般适用于寻找某人所在部门以及所有上级部门类似的逻辑 通过PredicateX指定的过滤规则,本节点或子节点满足过滤条件,则保留当前节点,否则抛弃节点及其子节点 即,一条路径上只要有一个节点符合条件,就保留整条路径上的节点static <T,R extends Comparable<R>>
BeanTree<T, R> BeanTree.ofMatch(FunctionX<T, R> idGetter, FunctionX<T, R> pidGetter, PredicateX<T> parentPredicate, FunctionX<T, List<T>> childrenGetter, BiConsumerX<T, List<T>> childrenSetter) 构建BeanTree