public abstract class TSimpleStreamImpl<T> extends Object implements TStream<T>
TStream.Builder<T>
Constructor and Description |
---|
TSimpleStreamImpl() |
Modifier and Type | Method and Description |
---|---|
boolean |
allMatch(Predicate<? super T> predicate) |
boolean |
anyMatch(Predicate<? super T> predicate) |
void |
close() |
<R> R |
collect(Supplier<R> supplier,
BiConsumer<R,? super T> accumulator,
BiConsumer<R,R> combiner) |
<R,A> R |
collect(TCollector<? super T,A,R> collector) |
long |
count() |
TStream<T> |
distinct() |
protected int |
estimateSize() |
TStream<T> |
filter(Predicate<? super T> predicate) |
Optional<T> |
findAny() |
Optional<T> |
findFirst() |
<R> TStream<R> |
flatMap(Function<? super T,? extends TStream<? extends R>> mapper) |
TDoubleStream |
flatMapToDouble(Function<? super T,? extends TDoubleStream> mapper) |
TIntStream |
flatMapToInt(Function<? super T,? extends TIntStream> mapper) |
TLongStream |
flatMapToLong(Function<? super T,? extends TLongStream> mapper) |
void |
forEach(Consumer<? super T> action) |
void |
forEachOrdered(Consumer<? super T> action) |
boolean |
isParallel() |
Iterator<T> |
iterator() |
TStream<T> |
limit(long maxSize) |
<R> TStream<R> |
map(Function<? super T,? extends R> mapper) |
TDoubleStream |
mapToDouble(ToDoubleFunction<? super T> mapper) |
TIntStream |
mapToInt(ToIntFunction<? super T> mapper) |
TLongStream |
mapToLong(ToLongFunction<? super T> mapper) |
Optional<T> |
max(Comparator<? super T> comparator) |
Optional<T> |
min(Comparator<? super T> comparator) |
abstract boolean |
next(Predicate<? super T> consumer) |
boolean |
noneMatch(Predicate<? super T> predicate) |
TStream<T> |
onClose(Runnable closeHandler) |
TStream<T> |
parallel() |
TStream<T> |
peek(Consumer<? super T> action) |
Optional<T> |
reduce(BinaryOperator<T> accumulator) |
T |
reduce(T identity,
BinaryOperator<T> accumulator) |
<U> U |
reduce(U identity,
BiFunction<U,? super T,U> accumulator,
BinaryOperator<U> combiner) |
TStream<T> |
sequential() |
TStream<T> |
skip(long n) |
TStream<T> |
sorted() |
TStream<T> |
sorted(Comparator<? super T> comparator) |
Spliterator<T> |
spliterator() |
Object[] |
toArray() |
<A> A[] |
toArray(IntFunction<A[]> generator) |
TStream<T> |
unordered() |
public TIntStream mapToInt(ToIntFunction<? super T> mapper)
public TLongStream mapToLong(ToLongFunction<? super T> mapper)
public TDoubleStream mapToDouble(ToDoubleFunction<? super T> mapper)
mapToDouble
in interface TStream<T>
public TIntStream flatMapToInt(Function<? super T,? extends TIntStream> mapper)
flatMapToInt
in interface TStream<T>
public TLongStream flatMapToLong(Function<? super T,? extends TLongStream> mapper)
flatMapToLong
in interface TStream<T>
public TDoubleStream flatMapToDouble(Function<? super T,? extends TDoubleStream> mapper)
flatMapToDouble
in interface TStream<T>
public TStream<T> sorted(Comparator<? super T> comparator)
public void forEachOrdered(Consumer<? super T> action)
forEachOrdered
in interface TStream<T>
public <A> A[] toArray(IntFunction<A[]> generator)
public T reduce(T identity, BinaryOperator<T> accumulator)
public Optional<T> reduce(BinaryOperator<T> accumulator)
public <U> U reduce(U identity, BiFunction<U,? super T,U> accumulator, BinaryOperator<U> combiner)
public <R> R collect(Supplier<R> supplier, BiConsumer<R,? super T> accumulator, BiConsumer<R,R> combiner)
public <R,A> R collect(TCollector<? super T,A,R> collector)
public Optional<T> min(Comparator<? super T> comparator)
public Optional<T> max(Comparator<? super T> comparator)
public Iterator<T> iterator()
iterator
in interface TBaseStream<T,TStream<T>>
public Spliterator<T> spliterator()
spliterator
in interface TBaseStream<T,TStream<T>>
public boolean isParallel()
isParallel
in interface TBaseStream<T,TStream<T>>
public TStream<T> sequential()
sequential
in interface TBaseStream<T,TStream<T>>
public TStream<T> unordered()
unordered
in interface TBaseStream<T,TStream<T>>
public TStream<T> onClose(Runnable closeHandler)
onClose
in interface TBaseStream<T,TStream<T>>
public void close() throws Exception
close
in interface AutoCloseable
Exception
protected int estimateSize()
Copyright © 2019. All rights reserved.