Package io.vavr.collection
Class Maps
java.lang.Object
io.vavr.collection.Maps
INTERNAL: Common
Map
functions (not intended to be public).-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncomputeIfAbsent
(M map, K key, Function<? super K, ? extends V> mappingFunction) computeIfPresent
(M map, K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction) (package private) static <K,
V, M extends Map<K, V>>
Mdistinct
(M map) (package private) static <K,
V, M extends Map<K, V>>
MdistinctBy
(M map, Maps.OfEntries<K, V, M> ofEntries, Comparator<? super Tuple2<K, V>> comparator) (package private) static <K,
V, U, M extends Map<K, V>>
MdistinctBy
(M map, Maps.OfEntries<K, V, M> ofEntries, Function<? super Tuple2<K, V>, ? extends U> keyExtractor) (package private) static <K,
V, M extends Map<K, V>>
Mdrop
(M map, Maps.OfEntries<K, V, M> ofEntries, Supplier<M> emptySupplier, int n) (package private) static <K,
V, M extends Map<K, V>>
MdropRight
(M map, Maps.OfEntries<K, V, M> ofEntries, Supplier<M> emptySupplier, int n) (package private) static <K,
V, M extends Map<K, V>>
MdropUntil
(M map, Maps.OfEntries<K, V, M> ofEntries, Predicate<? super Tuple2<K, V>> predicate) (package private) static <K,
V, M extends Map<K, V>>
MdropWhile
(M map, Maps.OfEntries<K, V, M> ofEntries, Predicate<? super Tuple2<K, V>> predicate) (package private) static <K,
V, M extends Map<K, V>>
Mfilter
(M map, Maps.OfEntries<K, V, M> ofEntries, BiPredicate<? super K, ? super V> predicate) (package private) static <K,
V, M extends Map<K, V>>
Mfilter
(M map, Maps.OfEntries<K, V, M> ofEntries, Predicate<? super Tuple2<K, V>> predicate) (package private) static <K,
V, M extends Map<K, V>>
MfilterKeys
(M map, Maps.OfEntries<K, V, M> ofEntries, Predicate<? super K> predicate) (package private) static <K,
V, M extends Map<K, V>>
MfilterValues
(M map, Maps.OfEntries<K, V, M> ofEntries, Predicate<? super V> predicate) groupBy
(M map, Maps.OfEntries<K, V, M> ofEntries, Function<? super Tuple2<K, V>, ? extends C> classifier) grouped
(M map, Maps.OfEntries<K, V, M> ofEntries, int size) initOption
(M map) (package private) static <K,
V, M extends Map<K, V>>
Mmerge
(M map, Maps.OfEntries<K, V, M> ofEntries, Map<? extends K, ? extends V> that) (package private) static <K,
V, U extends V, M extends Map<K, V>>
Mmerge
(M map, Maps.OfEntries<K, V, M> ofEntries, Map<? extends K, U> that, BiFunction<? super V, ? super U, ? extends V> collisionResolution) (package private) static <T,
K, V, M extends Map<K, V>>
MofStream
(M map, Stream<? extends T> stream, Function<? super T, ? extends K> keyMapper, Function<? super T, ? extends V> valueMapper) (package private) static <T,
K, V, M extends Map<K, V>>
MofStream
(M map, Stream<? extends T> stream, Function<? super T, Tuple2<? extends K, ? extends V>> entryMapper) partition
(M map, Maps.OfEntries<K, V, M> ofEntries, Predicate<? super Tuple2<K, V>> predicate) (package private) static <K,
V, M extends Map<K, V>>
M(package private) static <K,
V, M extends Map<K, V>>
M(package private) static <K,
V, U extends V, M extends Map<K, V>>
Mput
(M map, Tuple2<? extends K, U> entry, BiFunction<? super V, ? super U, ? extends V> merge) (package private) static <K,
V, U extends V, M extends Map<K, V>>
Mput
(M map, K key, U value, BiFunction<? super V, ? super U, ? extends V> merge) (package private) static <K,
V, M extends Map<K, V>>
Mreject
(M map, Maps.OfEntries<K, V, M> ofEntries, BiPredicate<? super K, ? super V> predicate) (package private) static <K,
V, M extends Map<K, V>>
Mreject
(M map, Maps.OfEntries<K, V, M> ofEntries, Predicate<? super Tuple2<K, V>> predicate) (package private) static <K,
V, M extends Map<K, V>>
MrejectKeys
(M map, Maps.OfEntries<K, V, M> ofEntries, Predicate<? super K> predicate) (package private) static <K,
V, M extends Map<K, V>>
MrejectValues
(M map, Maps.OfEntries<K, V, M> ofEntries, Predicate<? super V> predicate) (package private) static <K,
V, M extends Map<K, V>>
M(package private) static <K,
V, M extends Map<K, V>>
Mreplace
(M map, K key, V oldValue, V newValue) (package private) static <K,
V, M extends Map<K, V>>
MreplaceAll
(M map, Tuple2<K, V> currentElement, Tuple2<K, V> newElement) (package private) static <K,
V, M extends Map<K, V>>
MreplaceAll
(M map, BiFunction<? super K, ? super V, ? extends V> function) (package private) static <K,
V, M extends Map<K, V>>
MreplaceValue
(M map, K key, V value) (package private) static <K,
V, M extends Map<K, V>>
Mscan
(M map, Tuple2<K, V> zero, BiFunction<? super Tuple2<K, V>, ? super Tuple2<K, V>, ? extends Tuple2<K, V>> operation, Function<Iterator<Tuple2<K, V>>, Traversable<Tuple2<K, V>>> finisher) slideBy
(M map, Maps.OfEntries<K, V, M> ofEntries, Function<? super Tuple2<K, V>, ?> classifier) sliding
(M map, Maps.OfEntries<K, V, M> ofEntries, int size) sliding
(M map, Maps.OfEntries<K, V, M> ofEntries, int size, int step) span
(M map, Maps.OfEntries<K, V, M> ofEntries, Predicate<? super Tuple2<K, V>> predicate) tailOption
(M map) (package private) static <K,
V, M extends Map<K, V>>
Mtake
(M map, Maps.OfEntries<K, V, M> ofEntries, int n) (package private) static <K,
V, M extends Map<K, V>>
MtakeRight
(M map, Maps.OfEntries<K, V, M> ofEntries, int n) (package private) static <K,
V, M extends Map<K, V>>
MtakeUntil
(M map, Maps.OfEntries<K, V, M> ofEntries, Predicate<? super Tuple2<K, V>> predicate) (package private) static <K,
V, M extends Map<K, V>>
MtakeWhile
(M map, Maps.OfEntries<K, V, M> ofEntries, Predicate<? super Tuple2<K, V>> predicate)
-
Constructor Details
-
Maps
private Maps()
-
-
Method Details
-
computeIfAbsent
-
computeIfPresent
static <K,V, Tuple2<Option<V>,M extends Map<K, V>> M> computeIfPresent(M map, K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction) -
distinct
-
distinctBy
static <K,V, M distinctByM extends Map<K, V>> (M map, Maps.OfEntries<K, V, M> ofEntries, Comparator<? super Tuple2<K, V>> comparator) -
distinctBy
static <K,V, M distinctByU, M extends Map<K, V>> (M map, Maps.OfEntries<K, V, M> ofEntries, Function<? super Tuple2<K, V>, ? extends U> keyExtractor) -
drop
static <K,V, M dropM extends Map<K, V>> (M map, Maps.OfEntries<K, V, M> ofEntries, Supplier<M> emptySupplier, int n) -
dropRight
static <K,V, M dropRightM extends Map<K, V>> (M map, Maps.OfEntries<K, V, M> ofEntries, Supplier<M> emptySupplier, int n) -
dropUntil
static <K,V, M dropUntilM extends Map<K, V>> (M map, Maps.OfEntries<K, V, M> ofEntries, Predicate<? super Tuple2<K, V>> predicate) -
dropWhile
static <K,V, M dropWhileM extends Map<K, V>> (M map, Maps.OfEntries<K, V, M> ofEntries, Predicate<? super Tuple2<K, V>> predicate) -
filter
static <K,V, M filterM extends Map<K, V>> (M map, Maps.OfEntries<K, V, M> ofEntries, BiPredicate<? super K, ? super V> predicate) -
filter
static <K,V, M filterM extends Map<K, V>> (M map, Maps.OfEntries<K, V, M> ofEntries, Predicate<? super Tuple2<K, V>> predicate) -
filterKeys
static <K,V, M filterKeysM extends Map<K, V>> (M map, Maps.OfEntries<K, V, M> ofEntries, Predicate<? super K> predicate) -
filterValues
static <K,V, M filterValuesM extends Map<K, V>> (M map, Maps.OfEntries<K, V, M> ofEntries, Predicate<? super V> predicate) -
groupBy
static <K,V, Map<C,C, M extends Map<K, V>> M> groupBy(M map, Maps.OfEntries<K, V, M> ofEntries, Function<? super Tuple2<K, V>, ? extends C> classifier) -
grouped
static <K,V, Iterator<M> groupedM extends Map<K, V>> (M map, Maps.OfEntries<K, V, M> ofEntries, int size) -
initOption
-
merge
static <K,V, M mergeM extends Map<K, V>> (M map, Maps.OfEntries<K, V, M> ofEntries, Map<? extends K, ? extends V> that) -
merge
static <K,V, M mergeU extends V, M extends Map<K, V>> (M map, Maps.OfEntries<K, V, M> ofEntries, Map<? extends K, U> that, BiFunction<? super V, ? super U, ? extends V> collisionResolution) -
ofStream
-
ofStream
-
partition
static <K,V, Tuple2<M,M extends Map<K, V>> M> partition(M map, Maps.OfEntries<K, V, M> ofEntries, Predicate<? super Tuple2<K, V>> predicate) -
peek
-
put
static <K,V, M putU extends V, M extends Map<K, V>> (M map, K key, U value, BiFunction<? super V, ? super U, ? extends V> merge) -
put
-
put
static <K,V, M putU extends V, M extends Map<K, V>> (M map, Tuple2<? extends K, U> entry, BiFunction<? super V, ? super U, ? extends V> merge) -
reject
static <K,V, M rejectM extends Map<K, V>> (M map, Maps.OfEntries<K, V, M> ofEntries, Predicate<? super Tuple2<K, V>> predicate) -
reject
static <K,V, M rejectM extends Map<K, V>> (M map, Maps.OfEntries<K, V, M> ofEntries, BiPredicate<? super K, ? super V> predicate) -
rejectKeys
static <K,V, M rejectKeysM extends Map<K, V>> (M map, Maps.OfEntries<K, V, M> ofEntries, Predicate<? super K> predicate) -
rejectValues
static <K,V, M rejectValuesM extends Map<K, V>> (M map, Maps.OfEntries<K, V, M> ofEntries, Predicate<? super V> predicate) -
replace
-
replace
-
replaceAll
static <K,V, M replaceAllM extends Map<K, V>> (M map, BiFunction<? super K, ? super V, ? extends V> function) -
replaceAll
-
replaceValue
-
scan
-
slideBy
static <K,V, Iterator<M> slideByM extends Map<K, V>> (M map, Maps.OfEntries<K, V, M> ofEntries, Function<? super Tuple2<K, V>, ?> classifier) -
sliding
static <K,V, Iterator<M> slidingM extends Map<K, V>> (M map, Maps.OfEntries<K, V, M> ofEntries, int size) -
sliding
static <K,V, Iterator<M> slidingM extends Map<K, V>> (M map, Maps.OfEntries<K, V, M> ofEntries, int size, int step) -
span
static <K,V, Tuple2<M,M extends Map<K, V>> M> span(M map, Maps.OfEntries<K, V, M> ofEntries, Predicate<? super Tuple2<K, V>> predicate) -
tailOption
-
take
-
takeRight
-
takeUntil
static <K,V, M takeUntilM extends Map<K, V>> (M map, Maps.OfEntries<K, V, M> ofEntries, Predicate<? super Tuple2<K, V>> predicate) -
takeWhile
static <K,V, M takeWhileM extends Map<K, V>> (M map, Maps.OfEntries<K, V, M> ofEntries, Predicate<? super Tuple2<K, V>> predicate)
-