Class StreamAdapter<T>
java.lang.Object
fr.lirmm.graphik.util.stream.StreamAdapter<T>
- Type Parameters:
T- element type
- All Implemented Interfaces:
AutoCloseable, BaseStream<T, Stream<T>>, Stream<T>
-
Nested Class Summary
Nested classes/interfaces inherited from interface Stream
Stream.Builder<T> -
Constructor Summary
ConstructorsConstructorDescriptionStreamAdapter(CloseableIterator<T> iterator) Creates a stream from a closeable iterator.StreamAdapter(Iterator<T> iterator) Creates a stream from a plain iterator. -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanvoidclose()<R> Rcollect(Supplier<R> arg0, BiConsumer<R, ? super T> arg1, BiConsumer<R, R> arg2) <R,A> R longcount()distinct()findAny()<R> Stream<R> flatMapToDouble(Function<? super T, ? extends DoubleStream> arg0) flatMapToInt(Function<? super T, ? extends IntStream> arg0) flatMapToLong(Function<? super T, ? extends LongStream> arg0) voidvoidforEachOrdered(Consumer<? super T> arg0) booleaniterator()limit(long arg0) <R> Stream<R> mapToDouble(ToDoubleFunction<? super T> arg0) mapToInt(ToIntFunction<? super T> arg0) mapToLong(ToLongFunction<? super T> arg0) max(Comparator<? super T> arg0) min(Comparator<? super T> arg0) booleanparallel()reduce(BinaryOperator<T> arg0) reduce(T arg0, BinaryOperator<T> arg1) <U> Ureduce(U arg0, BiFunction<U, ? super T, U> arg1, BinaryOperator<U> arg2) skip(long arg0) sorted()sorted(Comparator<? super T> arg0) Object[]toArray()<A> A[]toArray(IntFunction<A[]> arg0) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Stream
dropWhile, mapMulti, mapMultiToDouble, mapMultiToInt, mapMultiToLong, takeWhile, toList
-
Constructor Details
-
StreamAdapter
Creates a stream from a closeable iterator.- Parameters:
iterator- the source iterator
-
StreamAdapter
-
-
Method Details
-
allMatch
-
anyMatch
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceBaseStream<T, Stream<T>>
-
collect
-
collect
-
count
-
distinct
-
filter
-
findAny
-
findFirst
-
flatMap
-
flatMapToDouble
- Specified by:
flatMapToDoublein interfaceStream<T>
-
flatMapToInt
-
flatMapToLong
- Specified by:
flatMapToLongin interfaceStream<T>
-
forEach
-
forEachOrdered
- Specified by:
forEachOrderedin interfaceStream<T>
-
isParallel
public boolean isParallel()- Specified by:
isParallelin interfaceBaseStream<T, Stream<T>>
-
iterator
-
limit
-
map
-
mapToDouble
- Specified by:
mapToDoublein interfaceStream<T>
-
mapToInt
-
mapToLong
-
max
-
min
-
noneMatch
-
onClose
-
parallel
-
peek
-
reduce
-
reduce
-
reduce
-
sequential
- Specified by:
sequentialin interfaceBaseStream<T, Stream<T>>
-
skip
-
sorted
-
sorted
-
spliterator
- Specified by:
spliteratorin interfaceBaseStream<T, Stream<T>>
-
toArray
-
toArray
-
unordered
-