This is my thrid blog web site.

0%

java @FunctionalInterface UnaryOperator

Java @FunctionalInterface UnaryOperator

源码

1
2
3
4
5
6
@FunctionalInterface
public interface UnaryOperator<T> extends Function<T,T> {

static <T> UnaryOperator<T> identity(){return t -> t;}

}

介绍

其实就是一个输入输出类型相同的Function<T,E>.此时T 同 E.