| 限定符和类型 | 方法和说明 |
|---|---|
default Streamable<T> |
and(Iterable<? extends T> iterable)
Creates a new Streamable from the current one and the given Iterable concatenated.
|
default Streamable<T> |
and(Streamable<? extends T> streamable)
Convenience method to allow adding a Streamable directly as otherwise the invocation is ambiguous between
|
default Streamable<T> |
and(Supplier<? extends Stream<? extends T>> stream)
Creates a new Streamable from the current one and the given Stream concatenated.
|
default Streamable<T> |
and(T... others)
Creates a new Streamable from the current one and the given values concatenated.
|
static <T> Streamable<T> |
empty()
Returns an empty Streamable.
|
default Streamable<T> |
filter(Predicate<? super T> predicate)
Returns a new Streamable that will apply the given filter Predicate to the current one.
|
default <R> Streamable<R> |
flatMap(Function<? super T,? extends Stream<? extends R>> mapper)
Returns a new Streamable that will apply the given Function to the current one.
|
default Stream<T> |
get() |
default boolean |
isEmpty()
Returns whether the current Streamable is empty.
|
default <R> Streamable<R> |
map(Function<? super T,? extends R> mapper)
Returns a new Streamable that will apply the given Function to the current one.
|
static <T> Streamable<T> |
of(Iterable<T> iterable)
Returns a Streamable for the given Iterable.
|
static <T> Streamable<T> |
of(Supplier<? extends Stream<T>> supplier) |
static <T> Streamable<T> |
of(T... t)
Returns a Streamable with the given elements.
|
default Stream<T> |
stream()
Creates a non-parallel Stream of the underlying Iterable.
|
static <S> Collector<S,?,Streamable<S>> |
toStreamable()
A collector to easily produce a Streamable from a Stream using Collectors#toList as
intermediate collector.
|
static <S,T extends Iterable<S>> |
toStreamable(Collector<S,?,T> intermediate)
A collector to easily produce a Streamable from a Stream and the given intermediate collector.
|
forEach, iterator, spliteratorstatic <T> Streamable<T> empty()
@SafeVarargs static <T> Streamable<T> of(T... t)
static <T> Streamable<T> of(Iterable<T> iterable)
static <T> Streamable<T> of(Supplier<? extends Stream<T>> supplier)
default Stream<T> stream()
default <R> Streamable<R> map(Function<? super T,? extends R> mapper)
Stream.map(Function)default <R> Streamable<R> flatMap(Function<? super T,? extends Stream<? extends R>> mapper)
Stream.flatMap(Function)default Streamable<T> filter(Predicate<? super T> predicate)
Stream.filter(Predicate)default boolean isEmpty()
default Streamable<T> and(Supplier<? extends Stream<? extends T>> stream)
default Streamable<T> and(T... others)
default Streamable<T> and(Iterable<? extends T> iterable)
default Streamable<T> and(Streamable<? extends T> streamable)
static <S> Collector<S,?,Streamable<S>> toStreamable()
toStreamable(Collector)static <S,T extends Iterable<S>> Collector<S,?,Streamable<S>> toStreamable(Collector<S,?,T> intermediate)
Copyright © 2023 tan. All rights reserved.