谓词与函数对象 谓词 predicate C++ 标准定义谓词如下: The Predicate parameter is used whenever an algorithm expects a function object that when applied to the result of dereferencing the corresponding iterator returns a value testable as true. In other words, if an alg…
函数式接口: 函数式接口(Functional Interface)就是一个有且仅有一个抽象方法,但可以有多个非抽象方法的接口. 函数式接口可以被隐式转换为 Lambda 表达式. Function 函数 Function 与 BiFunction 输入一个或多个参数,也可以规定返回值类型,并执行一段逻辑 Function<Integer, Integer> function = num -> num + 1; Function<Integer, Integer> funct…