Uses of Interface
io.vavr.collection.Map
Packages that use Map
Package
Description
Beside
API
the io.vavr package contains core types like (Checked)Functions and Tuples.Purely functional collections based on Traversable.
-
Uses of Map in io.vavr
Modifier and TypeMethodDescriptionValueModule.toMap
(Value<T> value, R empty, Function<E, R> ofElement, Function<Iterable<E>, R> ofAll, Function<? super T, ? extends E> f) Modifier and TypeMethodDescriptionstatic <K,
V> Map <K, V> API.LinkedMap()
Alias forLinkedHashMap.empty()
static <K,
V> Map <K, V> Deprecated.Will be removed in a future version.static <K,
V> Map <K, V> API.LinkedMap
(K k1, V v1) Alias forLinkedHashMap.of(Object, Object)
static <K,
V> Map <K, V> API.LinkedMap
(K k1, V v1, K k2, V v2) static <K,
V> Map <K, V> API.LinkedMap
(K k1, V v1, K k2, V v2, K k3, V v3) static <K,
V> Map <K, V> API.LinkedMap
(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4) static <K,
V> Map <K, V> API.LinkedMap
(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5) static <K,
V> Map <K, V> API.LinkedMap
(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5, K k6, V v6) static <K,
V> Map <K, V> API.LinkedMap
(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7) static <K,
V> Map <K, V> API.LinkedMap
(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7, K k8, V v8) static <K,
V> Map <K, V> API.LinkedMap
(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7, K k8, V v8, K k9, V v9) static <K,
V> Map <K, V> API.LinkedMap
(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7, K k8, V v8, K k9, V v9, K k10, V v10) static <K,
V> Map <K, V> API.Map()
Alias forHashMap.empty()
static <K,
V> Map <K, V> Deprecated.Will be removed in a future version.static <K,
V> Map <K, V> API.Map
(K k1, V v1) Alias forHashMap.of(Object, Object)
static <K,
V> Map <K, V> API.Map
(K k1, V v1, K k2, V v2) static <K,
V> Map <K, V> API.Map
(K k1, V v1, K k2, V v2, K k3, V v3) static <K,
V> Map <K, V> API.Map
(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4) static <K,
V> Map <K, V> API.Map
(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5) static <K,
V> Map <K, V> API.Map
(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5, K k6, V v6) static <K,
V> Map <K, V> API.Map
(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7) static <K,
V> Map <K, V> API.Map
(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7, K k8, V v8) static <K,
V> Map <K, V> API.Map
(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7, K k8, V v8, K k9, V v9) static <K,
V> Map <K, V> API.Map
(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7, K k8, V v8, K k9, V v9, K k10, V v10) default <K,
V> Map <K, V> Value.toLinkedMap
(Function<? super T, ? extends Tuple2<? extends K, ? extends V>> f) Converts this to aMap
.default <K,
V> Map <K, V> Value.toLinkedMap
(Function<? super T, ? extends K> keyMapper, Function<? super T, ? extends V> valueMapper) Converts this to aMap
.default <K,
V> Map <K, V> Converts this to aMap
.default <K,
V> Map <K, V> Converts this to aMap
. -
Uses of Map in io.vavr.collection
Classes in io.vavr.collection with type parameters of type MapModifier and TypeInterfaceDescription(package private) static interface
Maps.OfEntries<K,
V, M extends Map<K, V>> Subinterfaces of Map in io.vavr.collectionClasses in io.vavr.collection that implement MapModifier and TypeClassDescriptionfinal class
HashMap<K,
V> An immutableHashMap
implementation based on a Hash array mapped trie (HAMT).final class
LinkedHashMap<K,
V> An immutableLinkedHashMap
implementation that has predictable (insertion-order) iteration.final class
TreeMap<K,
V> SortedMap implementation, backed by a Red/Black Tree.Fields in io.vavr.collection declared as MapMethods in io.vavr.collection with type parameters of type MapModifier and TypeMethodDescriptionMaps.computeIfAbsent
(M map, K key, Function<? super K, ? extends V> mappingFunction) Maps.computeIfPresent
(M map, K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction) (package private) static <K,
V, M extends Map<K, V>>
MMaps.distinct
(M map) (package private) static <K,
V, M extends Map<K, V>>
MMaps.distinctBy
(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>>
MMaps.distinctBy
(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>>
MMaps.drop
(M map, Maps.OfEntries<K, V, M> ofEntries, Supplier<M> emptySupplier, int n) (package private) static <K,
V, M extends Map<K, V>>
MMaps.dropRight
(M map, Maps.OfEntries<K, V, M> ofEntries, Supplier<M> emptySupplier, int n) (package private) static <K,
V, M extends Map<K, V>>
MMaps.dropUntil
(M map, Maps.OfEntries<K, V, M> ofEntries, Predicate<? super Tuple2<K, V>> predicate) (package private) static <K,
V, M extends Map<K, V>>
MMaps.dropWhile
(M map, Maps.OfEntries<K, V, M> ofEntries, Predicate<? super Tuple2<K, V>> predicate) (package private) static <K,
V, M extends Map<K, V>>
MMaps.filter
(M map, Maps.OfEntries<K, V, M> ofEntries, BiPredicate<? super K, ? super V> predicate) (package private) static <K,
V, M extends Map<K, V>>
MMaps.filter
(M map, Maps.OfEntries<K, V, M> ofEntries, Predicate<? super Tuple2<K, V>> predicate) (package private) static <K,
V, M extends Map<K, V>>
MMaps.filterKeys
(M map, Maps.OfEntries<K, V, M> ofEntries, Predicate<? super K> predicate) (package private) static <K,
V, M extends Map<K, V>>
MMaps.filterValues
(M map, Maps.OfEntries<K, V, M> ofEntries, Predicate<? super V> predicate) Maps.groupBy
(M map, Maps.OfEntries<K, V, M> ofEntries, Function<? super Tuple2<K, V>, ? extends C> classifier) Maps.grouped
(M map, Maps.OfEntries<K, V, M> ofEntries, int size) Maps.initOption
(M map) (package private) static <K,
V, K2, U extends Map<K2, V>>
UCollections.mapKeys
(Map<K, V> source, U zero, Function<? super K, ? extends K2> keyMapper, BiFunction<? super V, ? super V, ? extends V> valueMerge) (package private) static <K,
V, M extends Map<K, V>>
MMaps.merge
(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>>
MMaps.merge
(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>>
MMaps.ofStream
(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>>
MMaps.ofStream
(M map, Stream<? extends T> stream, Function<? super T, Tuple2<? extends K, ? extends V>> entryMapper) Maps.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>>
MMaps.put
(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>>
MMaps.put
(M map, K key, U value, BiFunction<? super V, ? super U, ? extends V> merge) (package private) static <K,
V, M extends Map<K, V>>
MMaps.reject
(M map, Maps.OfEntries<K, V, M> ofEntries, BiPredicate<? super K, ? super V> predicate) (package private) static <K,
V, M extends Map<K, V>>
MMaps.reject
(M map, Maps.OfEntries<K, V, M> ofEntries, Predicate<? super Tuple2<K, V>> predicate) (package private) static <K,
V, M extends Map<K, V>>
MMaps.rejectKeys
(M map, Maps.OfEntries<K, V, M> ofEntries, Predicate<? super K> predicate) (package private) static <K,
V, M extends Map<K, V>>
MMaps.rejectValues
(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>>
MMaps.replace
(M map, K key, V oldValue, V newValue) (package private) static <K,
V, M extends Map<K, V>>
MMaps.replaceAll
(M map, Tuple2<K, V> currentElement, Tuple2<K, V> newElement) (package private) static <K,
V, M extends Map<K, V>>
MMaps.replaceAll
(M map, BiFunction<? super K, ? super V, ? extends V> function) (package private) static <K,
V, M extends Map<K, V>>
MMaps.replaceValue
(M map, K key, V value) (package private) static <K,
V, M extends Map<K, V>>
MMaps.scan
(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) Maps.slideBy
(M map, Maps.OfEntries<K, V, M> ofEntries, Function<? super Tuple2<K, V>, ?> classifier) Maps.sliding
(M map, Maps.OfEntries<K, V, M> ofEntries, int size) Maps.sliding
(M map, Maps.OfEntries<K, V, M> ofEntries, int size, int step) Maps.span
(M map, Maps.OfEntries<K, V, M> ofEntries, Predicate<? super Tuple2<K, V>> predicate) Maps.tailOption
(M map) (package private) static <K,
V, M extends Map<K, V>>
MMaps.take
(M map, Maps.OfEntries<K, V, M> ofEntries, int n) (package private) static <K,
V, M extends Map<K, V>>
MMaps.takeRight
(M map, Maps.OfEntries<K, V, M> ofEntries, int n) (package private) static <K,
V, M extends Map<K, V>>
MMaps.takeUntil
(M map, Maps.OfEntries<K, V, M> ofEntries, Predicate<? super Tuple2<K, V>> predicate) (package private) static <K,
V, M extends Map<K, V>>
MMaps.takeWhile
(M map, Maps.OfEntries<K, V, M> ofEntries, Predicate<? super Tuple2<K, V>> predicate) Methods in io.vavr.collection that return MapModifier and TypeMethodDescriptionMap
<K, Traversable<V>> AbstractMultimap.asMap()
Map
<K, Traversable<V>> Multimap.asMap()
Converts thisMultimap
to aMap
<K2,
V2> Map <K2, V2> Maps thisMap
to a newMap
with different component type by applying a function to its elements.Map.distinct()
Map.distinctBy
(Comparator<? super Tuple2<K, V>> comparator) Map.distinctBy
(Function<? super Tuple2<K, V>, ? extends U> keyExtractor) Map.drop
(int n) Map.dropRight
(int n) protected abstract <K2,
V2> Map <K2, V2> AbstractMultimap.emptyMapSupplier()
protected <K2,
V2> Map <K2, V2> HashMultimap.emptyMapSupplier()
protected <K2,
V2> Map <K2, V2> LinkedHashMultimap.emptyMapSupplier()
protected <K2,
V2> Map <K2, V2> TreeMultimap.emptyMapSupplier()
Map.filter
(BiPredicate<? super K, ? super V> predicate) Returns a new Map consisting of all elements which satisfy the given predicate.Map.filterKeys
(Predicate<? super K> predicate) Returns a new Map consisting of all elements with keys which satisfy the given predicate.Map.filterValues
(Predicate<? super V> predicate) Returns a new Map consisting of all elements with values which satisfy the given predicate.<K2,
V2> Map <K2, V2> FlatMaps thisMap
to a newMap
with different component type.Collections.groupBy
(Traversable<T> source, Function<? super T, ? extends C> classifier, Function<? super Iterable<T>, R> mapper) <C> Map
<C, ? extends IndexedSeq<T>> <C> Map
<C, LinkedHashMap<K, V>> <C> Map
<C, LinkedHashSet<T>> Maps.groupBy
(M map, Maps.OfEntries<K, V, M> ofEntries, Function<? super Tuple2<K, V>, ? extends C> classifier) <C> Map
<C, ? extends PriorityQueue<T>> <C> Map
<C, ? extends SortedMultimap<K, V>> <C> Map
<C, ? extends Traversable<T>> Groups this elements by classifying the elements.Map.init()
<K2,
V2> Map <K2, V2> Map.map
(BiFunction<? super K, ? super V, Tuple2<K2, V2>> mapper) Maps the entries of thisMap
to form a newMap
.Maps the keys of thisMap
while preserving the corresponding values.Map.mapKeys
(Function<? super K, ? extends K2> keyMapper, BiFunction<? super V, ? super V, ? extends V> valueMerge) Maps the keys of thisMap
while preserving the corresponding values and applying a value merge function on collisions.Maps the values of thisMap
while preserving the corresponding keys.Creates a new map which by merging the entries ofthis
map andthat
map.Creates a new map which by merging the entries ofthis
map andthat
map.static <K,
V> Map <K, V> Narrows a widenedMap<? extends K, ? extends V>
toMap<K, V>
by performing a type-safe cast.Convenience method forput(entry._1, entry._2)
.Convenience method forput(entry._1, entry._2, merge)
.Map.put
(K key, U value, BiFunction<? super V, ? super U, ? extends V> merge) Associates the specified value with the specified key in this map.Associates the specified value with the specified key in this map.Map.reject
(BiPredicate<? super K, ? super V> predicate) Returns a new Map consisting of all elements which do not satisfy the given predicate.Map.rejectKeys
(Predicate<? super K> predicate) Returns a new Map consisting of all elements with keys which do not satisfy the given predicate.Map.rejectValues
(Predicate<? super V> predicate) Returns a new Map consisting of all elements with values which do not satisfy the given predicate.Removes the mapping for a key from this map if it is present.Removes the mapping for a key from this map if it is present.Map.removeAll
(BiPredicate<? super K, ? super V> predicate) Deprecated.Please usereject(BiPredicate)
Map.removeKeys
(Predicate<? super K> predicate) Deprecated.Please userejectKeys(Predicate)
Map.removeValues
(Predicate<? super V> predicate) Deprecated.Please userejectValues(Predicate)
Replaces the entry for the specified key only if currently mapped to the specified value.Map.replaceAll
(BiFunction<? super K, ? super V, ? extends V> function) Replaces each entry's value with the result of invoking the given function on that entry until all entries have been processed or the function throws an exception.Map.replaceValue
(K key, V value) Replaces the entry for the specified key only if it is currently mapped to some value.Map.scan
(Tuple2<K, V> zero, BiFunction<? super Tuple2<K, V>, ? super Tuple2<K, V>, ? extends Tuple2<K, V>> operation) Map.tail()
Map.take
(int n) Map.takeRight
(int n) Methods in io.vavr.collection that return types with arguments of type MapModifier and TypeMethodDescriptionMatches each element with a unique key that you extract from it.Map.computeIfAbsent
(K key, Function<? super K, ? extends V> mappingFunction) If the specified key is not already associated with a value, attempts to compute its value using the given mapping function and enters it into this map.Map.computeIfPresent
(K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction) If the value for the specified key is present, attempts to compute a new mapping given the key and its current mapped value.Map.grouped
(int size) Map.initOption()
Map.sliding
(int size) Map.sliding
(int size, int step) Map.tailOption()
Methods in io.vavr.collection with parameters of type MapModifier and TypeMethodDescriptionprotected abstract <K2,
V2> Multimap <K2, V2> AbstractMultimap.createFromMap
(Map<K2, Traversable<V2>> back) protected <K2,
V2> HashMultimap <K2, V2> HashMultimap.createFromMap
(Map<K2, Traversable<V2>> back) protected <K2,
V2> LinkedHashMultimap <K2, V2> LinkedHashMultimap.createFromMap
(Map<K2, Traversable<V2>> back) protected <K2,
V2> TreeMultimap <K2, V2> TreeMultimap.createFromMap
(Map<K2, Traversable<V2>> back) (package private) static <K,
V> boolean (package private) static <K,
V, K2, U extends Map<K2, V>>
UCollections.mapKeys
(Map<K, V> source, U zero, Function<? super K, ? extends K2> keyMapper, BiFunction<? super V, ? super V, ? extends V> valueMerge) HashMap.merge
(Map<? extends K, U> that, BiFunction<? super V, ? super U, ? extends V> collisionResolution) <U extends V>
LinkedHashMap<K, V> LinkedHashMap.merge
(Map<? extends K, U> that, BiFunction<? super V, ? super U, ? extends V> collisionResolution) Creates a new map which by merging the entries ofthis
map andthat
map.Creates a new map which by merging the entries ofthis
map andthat
map.(package private) static <K,
V, M extends Map<K, V>>
MMaps.merge
(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>>
MMaps.merge
(M map, Maps.OfEntries<K, V, M> ofEntries, Map<? extends K, U> that, BiFunction<? super V, ? super U, ? extends V> collisionResolution) SortedMap.merge
(Map<? extends K, U> that, BiFunction<? super V, ? super U, ? extends V> collisionResolution) TreeMap.merge
(Map<? extends K, U> that, BiFunction<? super V, ? super U, ? extends V> collisionResolution) static <K,
V> Map <K, V> Narrows a widenedMap<? extends K, ? extends V>
toMap<K, V>
by performing a type-safe cast.Method parameters in io.vavr.collection with type arguments of type MapModifier and TypeMethodDescriptiondefault <U> U
Transforms thisMap
.Constructors in io.vavr.collection with parameters of type MapModifierConstructorDescription(package private)
AbstractMultimap
(Map<K, Traversable<V>> back, Multimap.ContainerType containerType, AbstractMultimap.SerializableSupplier<Traversable<?>> emptyContainer) private
HashMultimap
(Map<K, Traversable<V>> back, Multimap.ContainerType containerType, AbstractMultimap.SerializableSupplier<Traversable<?>> emptyContainer) private
LinkedHashMultimap
(Map<K, Traversable<V>> back, Multimap.ContainerType containerType, AbstractMultimap.SerializableSupplier<Traversable<?>> emptyContainer) private
TreeMultimap
(Map<K, Traversable<V>> back, Multimap.ContainerType containerType, AbstractMultimap.SerializableSupplier<Traversable<?>> emptyContainer)