java.util.stream 包的共享 API
编辑java.util.stream 包的共享 API
编辑请参阅 共享 API,以了解所有包和类的概述。
BaseStream
编辑- void close()
- boolean equals(Object)
- int hashCode()
- boolean isParallel()
- Iterator iterator()
- BaseStream sequential()
- Spliterator spliterator()
- null toString()
- BaseStream unordered()
Collector
编辑- static Collector of(Supplier, BiConsumer, BinaryOperator, Collector.Characteristics[])
- static Collector of(Supplier, BiConsumer, BinaryOperator, Function, Collector.Characteristics[])
- BiConsumer accumulator()
- Set characteristics()
- BinaryOperator combiner()
- boolean equals(Object)
- Function finisher()
- int hashCode()
- Supplier supplier()
- null toString()
Collector.Characteristics
编辑- static Collector.Characteristics CONCURRENT
- static Collector.Characteristics IDENTITY_FINISH
- static Collector.Characteristics UNORDERED
- static Collector.Characteristics valueOf(null)
- static Collector.Characteristics[] values()
- int compareTo(Enum)
- boolean equals(Object)
- int hashCode()
- null name()
- int ordinal()
- null toString()
Collectors
编辑- static Collector averagingDouble(ToDoubleFunction)
- static Collector averagingInt(ToIntFunction)
- static Collector averagingLong(ToLongFunction)
- static Collector collectingAndThen(Collector, Function)
- static Collector counting()
- static Collector groupingBy(Function)
- static Collector groupingBy(Function, Collector)
- static Collector groupingBy(Function, Supplier, Collector)
- static Collector joining()
- static Collector joining(CharSequence)
- static Collector joining(CharSequence, CharSequence, CharSequence)
- static Collector mapping(Function, Collector)
- static Collector maxBy(Comparator)
- static Collector minBy(Comparator)
- static Collector partitioningBy(Predicate)
- static Collector partitioningBy(Predicate, Collector)
- static Collector reducing(BinaryOperator)
- static Collector reducing(def, BinaryOperator)
- static Collector reducing(def, Function, BinaryOperator)
- static Collector summarizingDouble(ToDoubleFunction)
- static Collector summarizingInt(ToIntFunction)
- static Collector summarizingLong(ToLongFunction)
- static Collector summingDouble(ToDoubleFunction)
- static Collector summingInt(ToIntFunction)
- static Collector summingLong(ToLongFunction)
- static Collector toCollection(Supplier)
- static Collector toList()
- static Collector toMap(Function, Function)
- static Collector toMap(Function, Function, BinaryOperator)
- static Collector toMap(Function, Function, BinaryOperator, Supplier)
- static Collector toSet()
- boolean equals(Object)
- int hashCode()
- null toString()
DoubleStream
编辑- static DoubleStream.Builder builder()
- static DoubleStream concat(DoubleStream, DoubleStream)
- static DoubleStream empty()
- static DoubleStream of(double[])
- boolean allMatch(DoublePredicate)
- boolean anyMatch(DoublePredicate)
- OptionalDouble average()
- Stream boxed()
- void close()
- def collect(Supplier, ObjDoubleConsumer, BiConsumer)
- long count()
- DoubleStream distinct()
- boolean equals(Object)
- DoubleStream filter(DoublePredicate)
- OptionalDouble findAny()
- OptionalDouble findFirst()
- DoubleStream flatMap(DoubleFunction)
- void forEach(DoubleConsumer)
- void forEachOrdered(DoubleConsumer)
- int hashCode()
- boolean isParallel()
- PrimitiveIterator.OfDouble iterator()
- DoubleStream limit(long)
- DoubleStream map(DoubleUnaryOperator)
- IntStream mapToInt(DoubleToIntFunction)
- LongStream mapToLong(DoubleToLongFunction)
- Stream mapToObj(DoubleFunction)
- OptionalDouble max()
- OptionalDouble min()
- boolean noneMatch(DoublePredicate)
- DoubleStream peek(DoubleConsumer)
- OptionalDouble reduce(DoubleBinaryOperator)
- double reduce(double, DoubleBinaryOperator)
- DoubleStream sequential()
- DoubleStream 跳过(long)
- DoubleStream 排序()
- Spliterator.OfDouble 分割迭代器()
- double 求和()
- DoubleSummaryStatistics 汇总统计()
- double[] 转换为数组()
- null toString()
- BaseStream unordered()
DoubleStream.Builder
编辑IntStream
编辑- static IntStream.Builder 构建器()
- static IntStream 连接(IntStream, IntStream)
- static IntStream 空流()
- static IntStream of(int[])
- static IntStream 范围(int, int)
- static IntStream 闭区间范围(int, int)
- boolean 全部匹配(IntPredicate)
- boolean 任意匹配(IntPredicate)
- DoubleStream 转换为DoubleStream()
- LongStream 转换为LongStream()
- OptionalDouble 平均值()
- Stream 装箱()
- void close()
- def 收集(Supplier, ObjIntConsumer, BiConsumer)
- long 计数()
- IntStream 去重()
- boolean equals(Object)
- IntStream 过滤(IntPredicate)
- OptionalInt 查找任意一个()
- OptionalInt 查找第一个()
- IntStream 扁平化映射(IntFunction)
- void 遍历(IntConsumer)
- void 按顺序遍历(IntConsumer)
- int hashCode()
- boolean isParallel()
- PrimitiveIterator.OfInt 迭代器()
- IntStream 限制(long)
- IntStream 映射(IntUnaryOperator)
- DoubleStream 映射到DoubleStream(IntToDoubleFunction)
- LongStream 映射到LongStream(IntToLongFunction)
- Stream 映射到Stream(IntFunction)
- OptionalInt 最大值()
- OptionalInt 最小值()
- boolean 没有任何匹配(IntPredicate)
- IntStream 窥探(IntConsumer)
- OptionalInt 规约(IntBinaryOperator)
- int 规约(int, IntBinaryOperator)
- IntStream 顺序流()
- IntStream 跳过(long)
- IntStream 排序()
- Spliterator.OfInt 分割迭代器()
- int 求和()
- IntSummaryStatistics 汇总统计()
- int[] 转换为数组()
- null toString()
- BaseStream unordered()
IntStream.Builder
编辑LongStream
编辑- static LongStream.Builder 构建器()
- static LongStream 连接(LongStream, LongStream)
- static LongStream 空流()
- static LongStream of(long[])
- static LongStream 范围(long, long)
- static LongStream 闭区间范围(long, long)
- boolean 全部匹配(LongPredicate)
- boolean 任意匹配(LongPredicate)
- DoubleStream 转换为DoubleStream()
- OptionalDouble 平均值()
- Stream 装箱()
- void close()
- def 收集(Supplier, ObjLongConsumer, BiConsumer)
- long 计数()
- LongStream 去重()
- boolean equals(Object)
- LongStream 过滤(LongPredicate)
- OptionalLong 查找任意一个()
- OptionalLong 查找第一个()
- LongStream 扁平化映射(LongFunction)
- void 遍历(LongConsumer)
- void 按顺序遍历(LongConsumer)
- int hashCode()
- boolean isParallel()
- PrimitiveIterator.OfLong 迭代器()
- LongStream 限制(long)
- LongStream 映射(LongUnaryOperator)
- DoubleStream 映射到DoubleStream(LongToDoubleFunction)
- IntStream 映射到IntStream(LongToIntFunction)
- Stream 映射到Stream(LongFunction)
- OptionalLong 最大值()
- OptionalLong 最小值()
- boolean 没有任何匹配(LongPredicate)
- LongStream 窥探(LongConsumer)
- OptionalLong 规约(LongBinaryOperator)
- long 规约(long, LongBinaryOperator)
- LongStream sequential() 顺序流
- LongStream skip(long) 跳过指定数量的元素
- LongStream sorted() 排序
- Spliterator.OfLong spliterator() 获取流的Spliterator
- long sum() 求和
- LongSummaryStatistics summaryStatistics() 获取统计摘要
- long[] toArray() 转换为long数组
- null toString()
- BaseStream unordered()
LongStream.Builder LongStream构建器
编辑Stream 流
编辑- static Stream.Builder builder() 创建Stream构建器
- static Stream concat(Stream, Stream) 连接两个流
- static Stream empty() 创建空流
- static Stream of(def[]) 由数组创建流
- boolean allMatch(Predicate) 所有元素都匹配Predicate
- boolean anyMatch(Predicate) 至少一个元素匹配Predicate
- void close()
- def collect(Collector) 收集流元素
- def collect(Supplier, BiConsumer, BiConsumer) 使用自定义收集器收集流元素
- long count() 计数
- Stream distinct() 去重
- boolean equals(Object)
- Stream filter(Predicate) 过滤
- Optional findAny() 查找任意一个元素
- Optional findFirst() 查找第一个元素
- Stream flatMap(Function) 扁平化映射
- DoubleStream flatMapToDouble(Function) 扁平化映射到DoubleStream
- IntStream flatMapToInt(Function) 扁平化映射到IntStream
- LongStream flatMapToLong(Function) 扁平化映射到LongStream
- void forEach(Consumer) 遍历每个元素
- void forEachOrdered(Consumer) 按顺序遍历每个元素
- int hashCode()
- boolean isParallel()
- Iterator iterator()
- Stream limit(long) 限制元素数量
- Stream map(Function) 映射
- DoubleStream mapToDouble(ToDoubleFunction) 映射到DoubleStream
- IntStream mapToInt(ToIntFunction) 映射到IntStream
- LongStream mapToLong(ToLongFunction) 映射到LongStream
- Optional max(Comparator) 查找最大值
- Optional min(Comparator) 查找最小值
- boolean noneMatch(Predicate) 没有元素匹配Predicate
- Stream peek(Consumer) 执行一个操作,但不改变流
- Optional reduce(BinaryOperator) 规约
- def reduce(def, BinaryOperator) 规约,指定初始值
- def reduce(def, BiFunction, BinaryOperator) 规约,指定初始值和组合函数
- BaseStream sequential()
- Stream skip(long) 跳过指定数量的元素
- Stream sorted() 排序
- Stream sorted(Comparator) 根据Comparator排序
- Spliterator spliterator()
- def[] toArray() 转换为数组
- def[] toArray(IntFunction) 使用自定义函数转换为数组
- null toString()
- BaseStream unordered()