Module org.tquadrat.foundation.base
Class DefaultMapStream<K,V>
java.lang.Object
org.tquadrat.foundation.stream.internal.DefaultMapStream<K,V>
- Type Parameters:
K- The type of the map keys.V- The type of the map values.
- All Implemented Interfaces:
AutoCloseable,BaseStream<Map.Entry<K,,V>, Stream<Map.Entry<K, V>>> Stream<Map.Entry<K,,V>> MapStream<K,V>
@ClassVersion(sourceVersion="$Id: DefaultMapStream.java 1060 2023-09-24 19:21:40Z tquadrat $")
@API(status=INTERNAL,
since="0.0.7")
public final class DefaultMapStream<K,V>
extends Object
implements MapStream<K,V>
The default implementation for
MapStream.- Author:
- Alexis Cartier (alexcrt), Dominic Fox
- Modified by:
- Thomas Thrien (thomas.thrien@tquadrat.org)
- Version:
- $Id: DefaultMapStream.java 1060 2023-09-24 19:21:40Z tquadrat $
- Since:
- 0.0.7
- UML Diagram
-
UML Diagram for "org.tquadrat.foundation.stream.internal.DefaultMapStream"
-
Nested Class Summary
Nested classes/interfaces inherited from interface java.util.stream.Stream
Stream.Builder<T> -
Field Summary
FieldsModifier and TypeFieldDescriptionThe wrapped stream. -
Constructor Summary
ConstructorsConstructorDescriptionDefaultMapStream(Stream<Map.Entry<K, V>> stream) Creates a newDefaultMapStreaminstance from the provided stream. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanfinal booleanfinal voidclose()final <R> Rcollect(Supplier<R> supplier, BiConsumer<R, ? super Map.Entry<K, V>> accumulator, BiConsumer<R, R> combiner) final <R,A> R final longcount()distinct()findAny()final <R> Stream<R> final DoubleStreamflatMapToDouble(Function<? super Map.Entry<K, V>, ? extends DoubleStream> mapper) final IntStreamfinal LongStreamflatMapToLong(Function<? super Map.Entry<K, V>, ? extends LongStream> mapper) final voidfinal voidforEachOrdered(Consumer<? super Map.Entry<K, V>> action) final booleaniterator()limit(long maxSize) final <R> Stream<R> final DoubleStreammapToDouble(ToDoubleFunction<? super Map.Entry<K, V>> mapper) final IntStreammapToInt(ToIntFunction<? super Map.Entry<K, V>> mapper) final LongStreammapToLong(ToLongFunction<? super Map.Entry<K, V>> mapper) max(Comparator<? super Map.Entry<K, V>> comparator) min(Comparator<? super Map.Entry<K, V>> comparator) final booleanparallel()reduce(BinaryOperator<Map.Entry<K, V>> accumulator) final <U> Ureduce(U identity, BiFunction<U, ? super Map.Entry<K, V>, U> accumulator, BinaryOperator<U> combiner) skip(long n) sorted()sorted(Comparator<? super Map.Entry<K, V>> comparator) final Spliterator<Map.Entry<K, V>> final Object[]toArray()final <A> A[]toArray(IntFunction<A[]> generator) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.tquadrat.foundation.stream.MapStream
collect, collect, dropKeys, dropValues, filter, forEach, inverseMapping, map, mapEntries, mapKeys, mapValues, mergeKeys, mergeKeysMethods inherited from interface java.util.stream.Stream
dropWhile, mapMulti, mapMultiToDouble, mapMultiToInt, mapMultiToLong, takeWhile, toList
-
Field Details
-
m_Delegate
The wrapped stream.
-
-
Constructor Details
-
DefaultMapStream
Creates a newDefaultMapStreaminstance from the provided stream.- Parameters:
stream- The stream to wrap.
-
-
Method Details
-
allMatch
-
anyMatch
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceBaseStream<K,V>
-
collect
-
collect
public final <R> R collect(Supplier<R> supplier, BiConsumer<R, ? super Map.Entry<K, V>> accumulator, BiConsumer<R, R> combiner) -
count
-
distinct
-
filter
-
findAny
-
findFirst
-
flatMap
-
flatMapToDouble
public final DoubleStream flatMapToDouble(Function<? super Map.Entry<K, V>, ? extends DoubleStream> mapper) - Specified by:
flatMapToDoublein interfaceStream<K>
-
flatMapToInt
- Specified by:
flatMapToIntin interfaceStream<K>
-
flatMapToLong
- Specified by:
flatMapToLongin interfaceStream<K>
-
forEach
-
forEachOrdered
- Specified by:
forEachOrderedin interfaceStream<K>
-
isParallel
- Specified by:
isParallelin interfaceBaseStream<K,V>
-
iterator
- Specified by:
iteratorin interfaceBaseStream<K,V>
-
limit
-
map
-
mapToDouble
- Specified by:
mapToDoublein interfaceStream<K>
-
mapToInt
-
mapToLong
-
max
-
min
-
noneMatch
-
onClose
-
parallel
-
peek
-
reduce
-
reduce
-
reduce
public final <U> U reduce(U identity, BiFunction<U, ? super Map.Entry<K, V>, U> accumulator, BinaryOperator<U> combiner) -
sequential
- Specified by:
sequentialin interfaceBaseStream<K,V> - Specified by:
sequentialin interfaceMapStream<K,V>
-
skip
-
sorted
-
sorted
-
spliterator
- Specified by:
spliteratorin interfaceBaseStream<K,V> - See Also:
-
toArray
-
toArray
-
unordered
-
