F - 源元素类型T - 目标元素类型public class TransSpliterator<F,T> extends Object implements Spliterator<T>
Spliterator为新类型的SpliteratorSpliterator.OfDouble, Spliterator.OfInt, Spliterator.OfLong, Spliterator.OfPrimitive<T,T_CONS,T_SPLITR extends Spliterator.OfPrimitive<T,T_CONS,T_SPLITR>>CONCURRENT, DISTINCT, IMMUTABLE, NONNULL, ORDERED, SIZED, SORTED, SUBSIZED| Constructor and Description |
|---|
TransSpliterator(Spliterator<F> fromSpliterator,
Function<? super F,? extends T> function)
构造
|
| Modifier and Type | Method and Description |
|---|---|
int |
characteristics() |
long |
estimateSize() |
void |
forEachRemaining(Consumer<? super T> action) |
boolean |
tryAdvance(Consumer<? super T> action) |
Spliterator<T> |
trySplit() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetComparator, getExactSizeIfKnown, hasCharacteristicspublic TransSpliterator(Spliterator<F> fromSpliterator, Function<? super F,? extends T> function)
fromSpliterator - 源iteratorfunction - 函数public boolean tryAdvance(Consumer<? super T> action)
tryAdvance in interface Spliterator<T>public void forEachRemaining(Consumer<? super T> action)
forEachRemaining in interface Spliterator<T>public Spliterator<T> trySplit()
trySplit in interface Spliterator<T>public long estimateSize()
estimateSize in interface Spliterator<T>public int characteristics()
characteristics in interface Spliterator<T>Copyright © 2025. All rights reserved.