函数接口
Comparator
Consumer、BiConsumer、IntConsumer、LongConsumer、DoubleConsumer
子主题
Function、BiFunction、IntFunction、LongFunction、DoubleFunction
Predicate、BiPredicate、IntPredicate、LongPredicate、DoublePredicate
Supplier、IntSupplier、LongSupplier、DoubleSupplier<br>
子主题
UnaryOperator、BinaryOperator...
子主题
IntBinaryOperator
Stream
生成流:IntStream.range、
查找
findAny():返回的任意一个值满足条件接口,并非识别满足条件的所有内容
findFirst()
判断
anyMath()
allMath()
noneMatch():所有元素都不满足这个条件
化简
reduce():两两合并,适合求最大值、最小值、求和...
count()
max()
sum()
average()
收集
collect:收集,将流对象收集到容器<br>三个参数:创建容器,如何添加进容器,第三个参数
基本类型流
IntStream.of
LongStream.of
DoubleStream.of