java @FunctionalInterface UnaryOperator 发表于 2018-10-23 更新于 2021-02-21 Java @FunctionalInterface UnaryOperator源码123456@FunctionalInterfacepublic interface UnaryOperator<T> extends Function<T,T> { static <T> UnaryOperator<T> identity(){return t -> t;}} 介绍其实就是一个输入输出类型相同的Function<T,E>.此时T 同 E.