Package org.fcrepo.kernel.api.utils
Class WrappingStream<T>
- java.lang.Object
-
- org.fcrepo.kernel.api.utils.WrappingStream<T>
-
- All Implemented Interfaces:
AutoCloseable,BaseStream<T,Stream<T>>,Stream<T>
- Direct Known Subclasses:
DefaultRdfStream
public abstract class WrappingStream<T> extends Object implements Stream<T>
Partial Implementation of a Wrapping Stream- Since:
- Dec 6, 2015
- Author:
- acoburn
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface java.util.stream.Stream
Stream.Builder<T extends Object>
-
-
Constructor Summary
Constructors Constructor Description WrappingStream()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanallMatch(Predicate<? super T> predicate)booleananyMatch(Predicate<? super T> predicate)voidclose()<R> Rcollect(Supplier<R> supplier, BiConsumer<R,? super T> accumulator, BiConsumer<R,R> combiner)<R,A>
Rcollect(Collector<? super T,A,R> collector)longcount()Optional<T>findAny()Optional<T>findFirst()<R> Stream<R>flatMap(Function<? super T,? extends Stream<? extends R>> mapper)DoubleStreamflatMapToDouble(Function<? super T,? extends DoubleStream> mapper)IntStreamflatMapToInt(Function<? super T,? extends IntStream> mapper)LongStreamflatMapToLong(Function<? super T,? extends LongStream> mapper)voidforEach(Consumer<? super T> action)voidforEachOrdered(Consumer<? super T> action)booleanisParallel()Iterator<T>iterator()<R> Stream<R>map(Function<? super T,? extends R> mapper)DoubleStreammapToDouble(ToDoubleFunction<? super T> mapper)IntStreammapToInt(ToIntFunction<? super T> mapper)LongStreammapToLong(ToLongFunction<? super T> mapper)Optional<T>max(Comparator<? super T> comparator)Optional<T>min(Comparator<? super T> comparator)booleannoneMatch(Predicate<? super T> predicate)Optional<T>reduce(BinaryOperator<T> accumulator)Treduce(T identity, BinaryOperator<T> accumulator)<U> Ureduce(U identity, BiFunction<U,? super T,U> accumulator, BinaryOperator<U> combiner)Spliterator<T>spliterator()Object[]toArray()<A> A[]toArray(IntFunction<A[]> generator)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.stream.BaseStream
onClose, parallel, sequential, unordered
-
-
-
-
Constructor Detail
-
WrappingStream
public WrappingStream()
-
-
Method Detail
-
collect
public <R> R collect(Supplier<R> supplier, BiConsumer<R,? super T> accumulator, BiConsumer<R,R> combiner)
-
flatMapToDouble
public DoubleStream flatMapToDouble(Function<? super T,? extends DoubleStream> mapper)
- Specified by:
flatMapToDoublein interfaceStream<T>
-
flatMapToInt
public IntStream flatMapToInt(Function<? super T,? extends IntStream> mapper)
- Specified by:
flatMapToIntin interfaceStream<T>
-
flatMapToLong
public LongStream flatMapToLong(Function<? super T,? extends LongStream> mapper)
- Specified by:
flatMapToLongin interfaceStream<T>
-
forEachOrdered
public void forEachOrdered(Consumer<? super T> action)
- Specified by:
forEachOrderedin interfaceStream<T>
-
mapToDouble
public DoubleStream mapToDouble(ToDoubleFunction<? super T> mapper)
- Specified by:
mapToDoublein interfaceStream<T>
-
mapToInt
public IntStream mapToInt(ToIntFunction<? super T> mapper)
-
mapToLong
public LongStream mapToLong(ToLongFunction<? super T> mapper)
-
max
public Optional<T> max(Comparator<? super T> comparator)
-
min
public Optional<T> min(Comparator<? super T> comparator)
-
reduce
public Optional<T> reduce(BinaryOperator<T> accumulator)
-
reduce
public T reduce(T identity, BinaryOperator<T> accumulator)
-
reduce
public <U> U reduce(U identity, BiFunction<U,? super T,U> accumulator, BinaryOperator<U> combiner)
-
toArray
public <A> A[] toArray(IntFunction<A[]> generator)
-
close
public void close()
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceBaseStream<T,Stream<T>>
-
isParallel
public boolean isParallel()
- Specified by:
isParallelin interfaceBaseStream<T,Stream<T>>
-
spliterator
public Spliterator<T> spliterator()
- Specified by:
spliteratorin interfaceBaseStream<T,Stream<T>>
-
-