Class EnhancedWrappedStream<T,S extends EnhancedWrappedStream<T,S>>
java.lang.Object
org.miaixz.bus.core.center.stream.EnhancedWrappedStream<T,S>
- Type Parameters:
T- 流中的元素类型S-EnhancedWrappedStream的实现类类型
- All Implemented Interfaces:
AutoCloseable,Iterable<T>,BaseStream<T,,Stream<T>> Stream<T>,TerminableWrappedStream<T,,S> TransformableWrappedStream<T,,S> WrappedStream<T,S>
- Direct Known Subclasses:
EasyStream,EntryStream
public abstract class EnhancedWrappedStream<T,S extends EnhancedWrappedStream<T,S>>
extends Object
implements TerminableWrappedStream<T,S>, TransformableWrappedStream<T,S>
WrappedStream接口的公共实现,用于包装并增强一个已有的流实例- Since:
- Java 17+
- Author:
- Kimi Liu
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface java.util.stream.Stream
Stream.Builder<T> -
Field Summary
FieldsFields inherited from interface org.miaixz.bus.core.center.stream.WrappedStream
NOT_FOUND_ELEMENT_INDEX -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.stream.Stream
mapMultiToDouble, mapMultiToInt, mapMultiToLongMethods inherited from interface org.miaixz.bus.core.center.stream.TerminableWrappedStream
at, findFirst, findFirstIdx, findLast, findLast, findLastIdx, forEachIdx, forEachOrderedIdx, group, group, group, isEmpty, isNotEmpty, join, join, join, partition, partition, partition, toColl, toIdxMap, toIdxMap, toList, toMap, toMap, toMap, toMap, toSet, toUnmodifiableList, toUnmodifiableMap, toUnmodifiableMap, toUnmodifiableSet, toZipMethods inherited from interface org.miaixz.bus.core.center.stream.TransformableWrappedStream
append, distinct, dropWhile, filter, filterIdx, flat, flat, flatMap, flatMapIdx, flatNonNull, flatTree, log, map, mapIdx, mapMulti, mapNonNull, nonNull, parallel, peekIdx, prepend, push, reverse, splice, split, splitList, takeWhile, toEntries, toEntries, unshift, zipMethods inherited from interface org.miaixz.bus.core.center.stream.WrappedStream
allMatch, anyMatch, close, collect, collect, count, distinct, easyStream, filter, findAny, findFirst, flatMapToDouble, flatMapToInt, flatMapToLong, forEach, forEachOrdered, isParallel, iterator, limit, mapToDouble, mapToInt, mapToLong, max, min, noneMatch, onClose, parallel, peek, reduce, reduce, reduce, sequential, skip, sorted, sorted, spliterator, toArray, toArray, unordered, wrap
-
Field Details
-
stream
原始流实例
-
-
Constructor Details
-
EnhancedWrappedStream
创建一个流包装器- Parameters:
stream- 包装的流对象- Throws:
NullPointerException- 当unwrap为null时抛出
-
-
Method Details
-
unwrap
获取被包装的元素流实例- Specified by:
unwrapin interfaceWrappedStream<T,S extends EnhancedWrappedStream<T, S>> - Returns:
- 被当前实例包装的流对象
-
hashCode
public int hashCode()获取当前被包装的实例的哈希值- Specified by:
hashCodein interfaceWrappedStream<T,S extends EnhancedWrappedStream<T, S>> - Overrides:
hashCodein classObject- Returns:
- 哈希值
-
equals
比较被包装的实例是否相等- Specified by:
equalsin interfaceWrappedStream<T,S extends EnhancedWrappedStream<T, S>> - Overrides:
equalsin classObject- Parameters:
obj- 对象- Returns:
- 是否相等
-
toString
将被包装的实例转为字符串- Specified by:
toStringin interfaceWrappedStream<T,S extends EnhancedWrappedStream<T, S>> - Overrides:
toStringin classObject- Returns:
- 字符串
-
exec
public void exec()触发流的执行,这是一个终端操作
-