public final class EntryStream<K,V>
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
<K2,V2> EntryStream<K2,V2> |
chain(Function<? super Stream<java.util.Map.Entry<K,V>>,? extends Stream<java.util.Map.Entry<K2,V2>>> transfer) |
void |
close() |
<R,A> R |
collect(Collector<? super java.util.Map.Entry<K,V>,A,R> collector) |
<R> R |
collect(Supplier<R> supplier,
BiConsumer<R,? super java.util.Map.Entry<K,V>> accumulator) |
static <K,V> EntryStream<K,V> |
concat(java.util.Collection<? extends java.util.Map<K,V>> maps) |
static <K,V> EntryStream<K,V> |
concat(java.util.Map<K,V>... maps) |
int |
count() |
EntryStream<K,V> |
distinct() |
EntryStream<K,V> |
distinctBy(Function<? super java.util.Map.Entry<K,V>,?> keyExtractor) |
EntryStream<K,V> |
distinctByKey() |
EntryStream<K,V> |
distinctByValue() |
static <K,V> EntryStream<K,V> |
empty() |
Stream<java.util.Map.Entry<K,V>> |
entries() |
<KK> EntryStream<K,V> |
filter(BiPredicate<? super K,? super V> predicate) |
<KK> EntryStream<K,V> |
filter(Predicate<java.util.Map.Entry<K,V>> predicate) |
<KK> EntryStream<K,V> |
filterByKey(Predicate<? super K> keyPredicate) |
<KK> EntryStream<K,V> |
filterByValue(Predicate<? super V> valuePredicate) |
<KK,VV> EntryStream<KK,VV> |
flatMap(Function<? super java.util.Map.Entry<K,V>,EntryStream<KK,VV>> mapper) |
<KK,VV> EntryStream<KK,VV> |
flatMap2(Function<? super java.util.Map.Entry<K,V>,Stream<java.util.Map.Entry<KK,VV>>> mapper) |
<KK,VV> EntryStream<KK,VV> |
flatMap3(Function<? super java.util.Map.Entry<K,V>,java.util.Map<KK,VV>> mapper) |
<KK> EntryStream<KK,V> |
flatMapKey(Function<? super K,Stream<KK>> keyMapper) |
<VV> EntryStream<K,VV> |
flatMapValue(Function<? super V,Stream<VV>> valueMapper) |
void |
forEach(BiConsumer<? super K,? super V> action) |
void |
forEach(Consumer<? super java.util.Map.Entry<K,V>> action) |
EntryStream<K,java.util.List<V>> |
groupBy() |
<A,D> EntryStream<K,D> |
groupBy(Collector<? super java.util.Map.Entry<K,V>,A,D> downstream) |
<A,D> EntryStream<K,D> |
groupBy(Collector<? super java.util.Map.Entry<K,V>,A,D> downstream,
Supplier<java.util.Map<K,D>> mapFactory) |
java.util.Map<K,java.util.List<V>> |
groupTo() |
<A,D> java.util.Map<K,D> |
groupTo(Collector<? super java.util.Map.Entry<K,V>,A,D> downstream) |
<D,A,M extends java.util.Map<K,D>> |
groupTo(Collector<? super java.util.Map.Entry<K,V>,A,D> downstream,
Supplier<M> mapFactory) |
EntryStream<V,K> |
inversed() |
java.util.Iterator<java.util.Map.Entry<K,V>> |
iterator() |
Stream<K> |
keys() |
EntryStream<K,V> |
limit(long n) |
<KK,VV> EntryStream<KK,VV> |
map(BiFunction<? super K,? super V,java.util.Map.Entry<KK,VV>> mapper) |
<KK,VV> EntryStream<KK,VV> |
map(Function<? super K,KK> keyMapper,
Function<? super V,VV> valueMapper) |
<KK,VV> EntryStream<KK,VV> |
map(Function<? super java.util.Map.Entry<K,V>,java.util.Map.Entry<KK,VV>> mapper) |
<KK> EntryStream<KK,V> |
mapKey(Function<? super K,KK> keyMapper) |
<VV> EntryStream<K,VV> |
mapValue(Function<? super V,VV> valueMapper) |
static <K,V> EntryStream<K,V> |
of(java.util.Collection<? extends java.util.Map.Entry<K,V>> entries) |
static <K,T> EntryStream<K,T> |
of(java.util.Collection<? extends T> c,
Function<? super T,K> keyExtractor) |
static <K,V> EntryStream<K,V> |
of(java.util.Iterator<? extends java.util.Map.Entry<K,V>> iterator) |
static <K,V> EntryStream<K,V> |
of(java.util.Map.Entry<K,V>... entries) |
static <K,V> EntryStream<K,V> |
of(java.util.Map<K,V> map) |
static <K,V> EntryStream<K,V> |
of(Stream<? extends java.util.Map.Entry<K,V>> s) |
static <K,T> EntryStream<K,T> |
of(T[] a,
Function<? super T,K> keyExtractor) |
EntryStream<K,V> |
onClose(java.lang.Runnable closeHandler) |
EntryStream<K,V> |
peek(BiConsumer<? super K,? super V> action) |
EntryStream<K,V> |
peek(Consumer<? super java.util.Map.Entry<K,V>> action) |
void |
println() |
Optional<java.util.Map.Entry<K,V>> |
reduce(BinaryOperator<java.util.Map.Entry<K,V>> accumulator) |
<U> U |
reduce(U identity,
BiFunction<U,? super java.util.Map.Entry<K,V>,U> accumulator) |
EntryStream<K,V> |
skip(long n) |
EntryStream<K,V> |
sorted(java.util.Comparator<? super java.util.Map.Entry<K,V>> comparator) |
<U extends java.lang.Comparable<? super U>> |
sortedBy(Function<? super java.util.Map.Entry<K,V>,U> keyExtractor) |
EntryStream<K,V> |
sortedByKey(java.util.Comparator<? super K> keyComparator) |
EntryStream<K,V> |
sortedByValue(java.util.Comparator<? super V> valueComparator) |
java.util.Map<K,V> |
toMap() |
java.util.Map<K,V> |
toMap(BinaryOperator<V> mergeFunction) |
<M extends java.util.Map<K,V>> |
toMap(BinaryOperator<V> mergeFunction,
Supplier<M> mapFactory) |
<M extends java.util.Map<K,V>> |
toMap(Supplier<M> mapFactory) |
Stream<V> |
values() |
static <K,V> EntryStream<K,V> |
zip(java.util.Collection<? extends K> keys,
java.util.Collection<? extends V> values) |
static <K,V> EntryStream<K,V> |
zip(K[] keys,
V[] values) |
public static <K,V> EntryStream<K,V> empty()
public static <K,V> EntryStream<K,V> of(Stream<? extends java.util.Map.Entry<K,V>> s)
public static <K,V> EntryStream<K,V> of(java.util.Iterator<? extends java.util.Map.Entry<K,V>> iterator)
public static <K,V> EntryStream<K,V> of(java.util.Map<K,V> map)
public static <K,V> EntryStream<K,V> of(java.util.Collection<? extends java.util.Map.Entry<K,V>> entries)
@SafeVarargs public static <K,V> EntryStream<K,V> of(java.util.Map.Entry<K,V>... entries)
public static <K,T> EntryStream<K,T> of(java.util.Collection<? extends T> c, Function<? super T,K> keyExtractor)
public static <K,T> EntryStream<K,T> of(T[] a, Function<? super T,K> keyExtractor)
@SafeVarargs public static <K,V> EntryStream<K,V> concat(java.util.Map<K,V>... maps)
public static <K,V> EntryStream<K,V> concat(java.util.Collection<? extends java.util.Map<K,V>> maps)
public static <K,V> EntryStream<K,V> zip(K[] keys, V[] values)
public static <K,V> EntryStream<K,V> zip(java.util.Collection<? extends K> keys, java.util.Collection<? extends V> values)
public EntryStream<V,K> inversed()
public <KK> EntryStream<K,V> filter(BiPredicate<? super K,? super V> predicate)
public <KK> EntryStream<K,V> filterByKey(Predicate<? super K> keyPredicate)
public <KK> EntryStream<K,V> filterByValue(Predicate<? super V> valuePredicate)
public <KK,VV> EntryStream<KK,VV> map(Function<? super java.util.Map.Entry<K,V>,java.util.Map.Entry<KK,VV>> mapper)
public <KK,VV> EntryStream<KK,VV> map(BiFunction<? super K,? super V,java.util.Map.Entry<KK,VV>> mapper)
public <KK,VV> EntryStream<KK,VV> map(Function<? super K,KK> keyMapper, Function<? super V,VV> valueMapper)
public <KK> EntryStream<KK,V> mapKey(Function<? super K,KK> keyMapper)
public <VV> EntryStream<K,VV> mapValue(Function<? super V,VV> valueMapper)
public <KK,VV> EntryStream<KK,VV> flatMap(Function<? super java.util.Map.Entry<K,V>,EntryStream<KK,VV>> mapper)
public <KK,VV> EntryStream<KK,VV> flatMap2(Function<? super java.util.Map.Entry<K,V>,Stream<java.util.Map.Entry<KK,VV>>> mapper)
public <KK,VV> EntryStream<KK,VV> flatMap3(Function<? super java.util.Map.Entry<K,V>,java.util.Map<KK,VV>> mapper)
public <KK> EntryStream<KK,V> flatMapKey(Function<? super K,Stream<KK>> keyMapper)
public <VV> EntryStream<K,VV> flatMapValue(Function<? super V,Stream<VV>> valueMapper)
public EntryStream<K,java.util.List<V>> groupBy()
classifier
- Collectors.groupingBy(Function)
public <A,D> EntryStream<K,D> groupBy(Collector<? super java.util.Map.Entry<K,V>,A,D> downstream)
downstream
- Collectors.groupingBy(Function, Collector)
public <A,D> EntryStream<K,D> groupBy(Collector<? super java.util.Map.Entry<K,V>,A,D> downstream, Supplier<java.util.Map<K,D>> mapFactory)
downstream
- mapFactory
- Collectors.groupingBy(Function, Collector)
public <A,D> java.util.Map<K,D> groupTo(Collector<? super java.util.Map.Entry<K,V>,A,D> downstream)
downstream
- public <D,A,M extends java.util.Map<K,D>> M groupTo(Collector<? super java.util.Map.Entry<K,V>,A,D> downstream, Supplier<M> mapFactory)
downstream
- mapFactory
- public EntryStream<K,V> sorted(java.util.Comparator<? super java.util.Map.Entry<K,V>> comparator)
public EntryStream<K,V> sortedByKey(java.util.Comparator<? super K> keyComparator)
public EntryStream<K,V> sortedByValue(java.util.Comparator<? super V> valueComparator)
public <U extends java.lang.Comparable<? super U>> EntryStream<K,V> sortedBy(Function<? super java.util.Map.Entry<K,V>,U> keyExtractor)
public EntryStream<K,V> distinct()
public EntryStream<K,V> distinctByKey()
public EntryStream<K,V> distinctByValue()
public EntryStream<K,V> distinctBy(Function<? super java.util.Map.Entry<K,V>,?> keyExtractor)
public EntryStream<K,V> skip(long n)
public EntryStream<K,V> limit(long n)
public EntryStream<K,V> peek(BiConsumer<? super K,? super V> action)
public void forEach(BiConsumer<? super K,? super V> action)
public int count()
public java.util.Map<K,V> toMap()
Collectors.toMap(Function, Function, BinaryOperator, Supplier)
public java.util.Map<K,V> toMap(BinaryOperator<V> mergeFunction)
mapFactory
- Collectors.toMap(Function, Function, BinaryOperator, Supplier)
public <M extends java.util.Map<K,V>> M toMap(Supplier<M> mapFactory)
mapFactory
- Collectors.toMap(Function, Function, BinaryOperator, Supplier)
public <M extends java.util.Map<K,V>> M toMap(BinaryOperator<V> mergeFunction, Supplier<M> mapFactory)
mergeFunction
- mapFactory
- Collectors.toMap(Function, Function, BinaryOperator, Supplier)
public Optional<java.util.Map.Entry<K,V>> reduce(BinaryOperator<java.util.Map.Entry<K,V>> accumulator)
public <U> U reduce(U identity, BiFunction<U,? super java.util.Map.Entry<K,V>,U> accumulator)
public <R> R collect(Supplier<R> supplier, BiConsumer<R,? super java.util.Map.Entry<K,V>> accumulator)
public <K2,V2> EntryStream<K2,V2> chain(Function<? super Stream<java.util.Map.Entry<K,V>>,? extends Stream<java.util.Map.Entry<K2,V2>>> transfer)
public void println()
public EntryStream<K,V> onClose(java.lang.Runnable closeHandler)
public void close()