T - Typepublic class NStreamBase<T> extends Object implements NStream<T>
| Modifier and Type | Field and Description |
|---|---|
protected NElement |
description |
protected Supplier<NIterator<T>> |
iteratorSupplier |
protected String |
name |
protected Runnable |
onClose |
| Constructor and Description |
|---|
NStreamBase(String name,
Supplier<NIterator<T>> iteratorSupplier,
NElement description,
Runnable onClose) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
allMatch(Predicate<? super T> predicate) |
boolean |
anyMatch(Predicate<? super T> predicate) |
void |
close() |
NStream<T> |
coalesce(Iterator<? extends T> other) |
NStream<T> |
coalesce(NStream<? extends T> other) |
<R,A> R |
collect(Collector<? super T,A,R> collector) |
<R> R |
collect(Supplier<R> supplier,
BiConsumer<R,? super T> accumulator,
BiConsumer<R,R> combiner) |
NStream<T> |
concat(Iterator<? extends T> other) |
NStream<T> |
concat(NStream<? extends T> other) |
long |
count() |
NElement |
describe() |
NStream<T> |
distinct() |
<R> NStream<T> |
distinctBy(Function<T,R> condition) |
NStream<T> |
filter(Predicate<? super T> predicate) |
NOptional<T> |
findAny() |
NOptional<T> |
findFirst() |
NOptional<T> |
findLast() |
NOptional<T> |
findSingleton() |
<R> NStream<R> |
flatMap(Function<? super T,? extends Stream<? extends R>> mapper) |
<R> NStream<R> |
flatMapArray(Function<? super T,? extends R[]> mapper) |
<R> NStream<R> |
flatMapIter(Function<? super T,? extends Iterator<? extends R>> mapper) |
<R> NStream<R> |
flatMapList(Function<? super T,? extends List<? extends R>> mapper) |
<R> NStream<R> |
flatMapStream(Function<? super T,? extends NStream<? extends R>> mapper) |
DoubleStream |
flatMapToDouble(Function<? super T,? extends DoubleStream> mapper) |
IntStream |
flatMapToInt(Function<? super T,? extends IntStream> mapper) |
LongStream |
flatMapToLong(Function<? super T,? extends LongStream> mapper) |
<K> Map<K,List<T>> |
groupBy(Function<? super T,? extends K> classifier) |
<K> NStream<Map.Entry<K,List<T>>> |
groupedBy(Function<? super T,? extends K> classifier) |
<V> NStream<V> |
instanceOf(Class<V> type) |
NIterator<T> |
iterator() |
NStream<T> |
limit(long maxSize) |
<R> NStream<R> |
map(Function<? super T,? extends R> mapper) |
DoubleStream |
mapToDouble(ToDoubleFunction<? super T> mapper) |
IntStream |
mapToInt(ToIntFunction<? super T> mapper) |
LongStream |
mapToLong(ToLongFunction<? super T> mapper) |
<R> NStream<R> |
mapUnsafe(UnsafeFunction<? super T,? extends R> mapper) |
<R> NStream<R> |
mapUnsafe(UnsafeFunction<? super T,? extends R> mapper,
Function<Exception,? extends R> onError) |
NOptional<T> |
max(Comparator<? super T> comparator) |
NOptional<T> |
min(Comparator<? super T> comparator) |
NStream<T> |
nonBlank() |
boolean |
noneMatch(Predicate<? super T> predicate) |
NStream<T> |
nonNull() |
static <X> NStream<X> |
ofCollection(String name,
Collection<X> o) |
static <X> NStream<X> |
ofCollection(String name,
Collection<X> o,
Runnable onClose) |
static <X> NStream<X> |
ofEmpty(String name) |
static <X> NStream<X> |
ofEmpty(String name,
Runnable onClose) |
static <X> NStream<X> |
ofIterable(String name,
NIterable<X> o) |
static <X> NStream<X> |
ofIterable(String name,
NIterable<X> o,
Runnable onClose) |
static <X> NStream<X> |
ofIterator(String name,
NIterator<X> o) |
static <X> NStream<X> |
ofIterator(String name,
NIterator<X> o,
Runnable onClose) |
static <X> NStream<X> |
ofJavaStream(String name,
Stream<X> o) |
static <X> NStream<X> |
ofJavaStream(String name,
Stream<X> o,
Runnable onClose) |
NStream<T> |
onClose(Runnable closeHandler) |
NStream<T> |
skip(long n) |
NStream<T> |
sorted() |
NStream<T> |
sorted(NComparator<T> comp) |
Stream<T> |
stream() |
<A> A[] |
toArray(IntFunction<A[]> generator) |
boolean[] |
toBooleanArray() |
byte[] |
toByteArray() |
char[] |
toCharArray() |
double[] |
toDoubleArray() |
float[] |
toFloatArray() |
int[] |
toIntArray() |
List<T> |
toList() |
long[] |
toLongArray() |
<K,U> Map<K,U> |
toMap(Function<? super T,? extends K> keyMapper,
Function<? super T,? extends U> valueMapper) |
<K,U> Map<K,U> |
toOrderedMap(Function<? super T,? extends K> keyMapper,
Function<? super T,? extends U> valueMapper) |
Set<T> |
toOrderedSet() |
Set<T> |
toSet() |
short[] |
toShortArray() |
<K,U> Map<K,U> |
toSortedMap(Function<? super T,? extends K> keyMapper,
Function<? super T,? extends U> valueMapper) |
Set<T> |
toSortedSet() |
NStream<T> |
withDescription(Supplier<NElement> description) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitofArray, ofArray, ofArray, ofArray, ofArray, ofArray, ofArray, ofArray, ofEmpty, ofIterable, ofIterator, ofOptional, ofOptional, ofSingleton, ofStreamforEach, spliteratorprotected String name
protected NElement description
protected Runnable onClose
public static <X> NStream<X> ofCollection(String name, Collection<X> o)
public static <X> NStream<X> ofCollection(String name, Collection<X> o, Runnable onClose)
public Set<T> toSortedSet()
toSortedSet in interface NStream<T>public Set<T> toOrderedSet()
toOrderedSet in interface NStream<T>public NOptional<T> findSingleton()
findSingleton in interface NStream<T>public <R> NStream<R> mapUnsafe(UnsafeFunction<? super T,? extends R> mapper, Function<Exception,? extends R> onError)
public <R> NStream<R> mapUnsafe(UnsafeFunction<? super T,? extends R> mapper)
public <R> NStream<T> distinctBy(Function<T,R> condition)
distinctBy in interface NStream<T>public boolean[] toBooleanArray()
toBooleanArray in interface NStream<T>public byte[] toByteArray()
toByteArray in interface NStream<T>public char[] toCharArray()
toCharArray in interface NStream<T>public short[] toShortArray()
toShortArray in interface NStream<T>public float[] toFloatArray()
toFloatArray in interface NStream<T>public int[] toIntArray()
toIntArray in interface NStream<T>public long[] toLongArray()
toLongArray in interface NStream<T>public double[] toDoubleArray()
toDoubleArray in interface NStream<T>public IntStream mapToInt(ToIntFunction<? super T> mapper)
public LongStream mapToLong(ToLongFunction<? super T> mapper)
public DoubleStream mapToDouble(ToDoubleFunction<? super T> mapper)
mapToDouble in interface NStream<T>public <A> A[] toArray(IntFunction<A[]> generator)
public <K,U> Map<K,U> toMap(Function<? super T,? extends K> keyMapper, Function<? super T,? extends U> valueMapper)
public <K,U> Map<K,U> toOrderedMap(Function<? super T,? extends K> keyMapper, Function<? super T,? extends U> valueMapper)
toOrderedMap in interface NStream<T>public <K,U> Map<K,U> toSortedMap(Function<? super T,? extends K> keyMapper, Function<? super T,? extends U> valueMapper)
toSortedMap in interface NStream<T>public <R> NStream<R> flatMapIter(Function<? super T,? extends Iterator<? extends R>> mapper)
flatMapIter in interface NStream<T>public <R> NStream<R> flatMapList(Function<? super T,? extends List<? extends R>> mapper)
flatMapList in interface NStream<T>public <R> NStream<R> flatMapArray(Function<? super T,? extends R[]> mapper)
flatMapArray in interface NStream<T>public <R> NStream<R> flatMapStream(Function<? super T,? extends NStream<? extends R>> mapper)
flatMapStream in interface NStream<T>public <K> NStream<Map.Entry<K,List<T>>> groupedBy(Function<? super T,? extends K> classifier)
public DoubleStream flatMapToDouble(Function<? super T,? extends DoubleStream> mapper)
flatMapToDouble in interface NStream<T>public IntStream flatMapToInt(Function<? super T,? extends IntStream> mapper)
flatMapToInt in interface NStream<T>public LongStream flatMapToLong(Function<? super T,? extends LongStream> mapper)
flatMapToLong in interface NStream<T>public <R> R collect(Supplier<R> supplier, BiConsumer<R,? super T> accumulator, BiConsumer<R,R> combiner)
public NOptional<T> min(Comparator<? super T> comparator)
public NOptional<T> max(Comparator<? super T> comparator)
public NElement describe()
describe in interface NDescribablepublic NStream<T> withDescription(Supplier<NElement> description)
withDescription in interface NRedescribable<NStream<T>>public <V> NStream<V> instanceOf(Class<V> type)
instanceOf in interface NStream<T>public void close()
close in interface AutoCloseableclose in interface NStream<T>Copyright © 2026 vpc open source initiative. All rights reserved.