public interface MapStream<K,V> extends Iterable<BiValue<K,V>>
(Based upon java.lang.MapStream coming in JDK 8.)
JDK 1.7 does not have the mechanism for adding default implementations
of interface methods. Therefore each class that implements this interface
has to implement each method. To see the default implementation of each
method, see the implementation in MapStream.AbstractMapStream
. It is not
required that an implementing class extend AbstractMapStream
.
The methods in AbstractMapStream
call static methods in MapStream.Impl
,
so it should be straightforward to reuse implementations.
Modifier and Type | Interface and Description |
---|---|
static class |
MapStream.AbstractMapStream<K,V> |
static class |
MapStream.BiVal<K,V> |
static class |
MapStream.Impl |
Modifier and Type | Method and Description |
---|---|
boolean |
allMatch(BiPredicate<? super K,? super V> predicate) |
boolean |
anyMatch(BiPredicate<? super K,? super V> predicate) |
Iterable<BiValue<K,V>> |
asIterable() |
MapStream<K,Iterable<V>> |
asMultiStream() |
MapStream<K,V> |
filter(BiPredicate<? super K,? super V> predicate) |
MapStream<K,V> |
filterKeys(Predicate<K> filter) |
MapStream<K,V> |
filterValues(Predicate<V> filter) |
void |
forEach(BiBlock<? super K,? super V> block) |
BiValue<K,V> |
getAny() |
BiValue<K,V> |
getFirst() |
BiValue<K,V> |
getOnly() |
Iterable<K> |
inputs() |
<A extends Map<? super K,? super V>> |
into(A destination) |
<A extends Map<? super K,C>,C extends Collection<? super V>> |
intoMulti(A destination,
Factory<C> factory) |
boolean |
isEmpty() |
<W> MapStream<K,W> |
map(BiMapper<K,V,W> mapper) |
<W> MapStream<K,W> |
mapValues(Mapper<V,W> mapper) |
<W> MapStream<K,Iterable<W>> |
mapValuesMulti(BiMapper<? super K,? super V,Iterable<W>> mapper) |
MapStream<K,V> |
merge(MapStream<K,V> other) |
boolean |
noneMatch(BiPredicate<? super K,? super V> predicate) |
MapStream<K,V> |
sorted(Comparator<? super K> comparator) |
MapStream<V,K> |
swap() |
Iterable<V> |
values() |
forEach, iterator, spliterator
boolean isEmpty()
<W> MapStream<K,Iterable<W>> mapValuesMulti(BiMapper<? super K,? super V,Iterable<W>> mapper)
<A extends Map<? super K,C>,C extends Collection<? super V>> A intoMulti(A destination, Factory<C> factory)
boolean anyMatch(BiPredicate<? super K,? super V> predicate)
boolean allMatch(BiPredicate<? super K,? super V> predicate)
boolean noneMatch(BiPredicate<? super K,? super V> predicate)
MapStream<K,V> sorted(Comparator<? super K> comparator)
Copyright © 2012-2014 Julian Hyde. All Rights Reserved.