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 1151 2025-10-01 21:32:15Z 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 1151 2025-10-01 21:32:15Z 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 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 limit) 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 Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface MapStream
collect, collect, dropKeys, dropValues, filter, forEach, inverseMapping, map, mapEntries, mapKeys, mapValues, mergeKeys, mergeKeysMethods inherited from interface Stream
dropWhile, gather, 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
public final LongStream flatMapToLong(Function<? super Map.Entry<K, V>, ? extends LongStream> mapper) - Specified by:
flatMapToLongin interfaceStream<K>
-
forEach
-
forEachOrdered
- Specified by:
forEachOrderedin interfaceStream<K>
-
isParallel
- Specified by:
isParallelin interfaceBaseStream<K,V>
-
iterator
-
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
-
