Class Maps

java.lang.Object
io.vavr.collection.Maps

final class Maps extends Object
INTERNAL: Common Map functions (not intended to be public).
  • Constructor Details

    • Maps

      private Maps()
  • Method Details

    • computeIfAbsent

      static <K, V, M extends Map<K, V>> Tuple2<V,M> computeIfAbsent(M map, K key, Function<? super K,? extends V> mappingFunction)
    • computeIfPresent

      static <K, V, M extends Map<K, V>> Tuple2<Option<V>,M> computeIfPresent(M map, K key, BiFunction<? super K,? super V,? extends V> remappingFunction)
    • distinct

      static <K, V, M extends Map<K, V>> M distinct(M map)
    • distinctBy

      static <K, V, M extends Map<K, V>> M distinctBy(M map, Maps.OfEntries<K,V,M> ofEntries, Comparator<? super Tuple2<K,V>> comparator)
    • distinctBy

      static <K, V, U, M extends Map<K, V>> M distinctBy(M map, Maps.OfEntries<K,V,M> ofEntries, Function<? super Tuple2<K,V>,? extends U> keyExtractor)
    • drop

      static <K, V, M extends Map<K, V>> M drop(M map, Maps.OfEntries<K,V,M> ofEntries, Supplier<M> emptySupplier, int n)
    • dropRight

      static <K, V, M extends Map<K, V>> M dropRight(M map, Maps.OfEntries<K,V,M> ofEntries, Supplier<M> emptySupplier, int n)
    • dropUntil

      static <K, V, M extends Map<K, V>> M dropUntil(M map, Maps.OfEntries<K,V,M> ofEntries, Predicate<? super Tuple2<K,V>> predicate)
    • dropWhile

      static <K, V, M extends Map<K, V>> M dropWhile(M map, Maps.OfEntries<K,V,M> ofEntries, Predicate<? super Tuple2<K,V>> predicate)
    • filter

      static <K, V, M extends Map<K, V>> M filter(M map, Maps.OfEntries<K,V,M> ofEntries, BiPredicate<? super K,? super V> predicate)
    • filter

      static <K, V, M extends Map<K, V>> M filter(M map, Maps.OfEntries<K,V,M> ofEntries, Predicate<? super Tuple2<K,V>> predicate)
    • filterKeys

      static <K, V, M extends Map<K, V>> M filterKeys(M map, Maps.OfEntries<K,V,M> ofEntries, Predicate<? super K> predicate)
    • filterValues

      static <K, V, M extends Map<K, V>> M filterValues(M map, Maps.OfEntries<K,V,M> ofEntries, Predicate<? super V> predicate)
    • groupBy

      static <K, V, C, M extends Map<K, V>> Map<C,M> groupBy(M map, Maps.OfEntries<K,V,M> ofEntries, Function<? super Tuple2<K,V>,? extends C> classifier)
    • grouped

      static <K, V, M extends Map<K, V>> Iterator<M> grouped(M map, Maps.OfEntries<K,V,M> ofEntries, int size)
    • initOption

      static <K, V, M extends Map<K, V>> Option<M> initOption(M map)
    • merge

      static <K, V, M extends Map<K, V>> M merge(M map, Maps.OfEntries<K,V,M> ofEntries, Map<? extends K,? extends V> that)
    • merge

      static <K, V, U extends V, M extends Map<K, V>> M merge(M map, Maps.OfEntries<K,V,M> ofEntries, Map<? extends K,U> that, BiFunction<? super V,? super U,? extends V> collisionResolution)
    • ofStream

      static <T, K, V, M extends Map<K, V>> M ofStream(M map, Stream<? extends T> stream, Function<? super T,? extends K> keyMapper, Function<? super T,? extends V> valueMapper)
    • ofStream

      static <T, K, V, M extends Map<K, V>> M ofStream(M map, Stream<? extends T> stream, Function<? super T,Tuple2<? extends K,? extends V>> entryMapper)
    • partition

      static <K, V, M extends Map<K, V>> Tuple2<M,M> partition(M map, Maps.OfEntries<K,V,M> ofEntries, Predicate<? super Tuple2<K,V>> predicate)
    • peek

      static <K, V, M extends Map<K, V>> M peek(M map, Consumer<? super Tuple2<K,V>> action)
    • put

      static <K, V, U extends V, M extends Map<K, V>> M put(M map, K key, U value, BiFunction<? super V,? super U,? extends V> merge)
    • put

      static <K, V, M extends Map<K, V>> M put(M map, Tuple2<? extends K,? extends V> entry)
    • put

      static <K, V, U extends V, M extends Map<K, V>> M put(M map, Tuple2<? extends K,U> entry, BiFunction<? super V,? super U,? extends V> merge)
    • reject

      static <K, V, M extends Map<K, V>> M reject(M map, Maps.OfEntries<K,V,M> ofEntries, Predicate<? super Tuple2<K,V>> predicate)
    • reject

      static <K, V, M extends Map<K, V>> M reject(M map, Maps.OfEntries<K,V,M> ofEntries, BiPredicate<? super K,? super V> predicate)
    • rejectKeys

      static <K, V, M extends Map<K, V>> M rejectKeys(M map, Maps.OfEntries<K,V,M> ofEntries, Predicate<? super K> predicate)
    • rejectValues

      static <K, V, M extends Map<K, V>> M rejectValues(M map, Maps.OfEntries<K,V,M> ofEntries, Predicate<? super V> predicate)
    • replace

      static <K, V, M extends Map<K, V>> M replace(M map, K key, V oldValue, V newValue)
    • replace

      static <K, V, M extends Map<K, V>> M replace(M map, Tuple2<K,V> currentElement, Tuple2<K,V> newElement)
    • replaceAll

      static <K, V, M extends Map<K, V>> M replaceAll(M map, BiFunction<? super K,? super V,? extends V> function)
    • replaceAll

      static <K, V, M extends Map<K, V>> M replaceAll(M map, Tuple2<K,V> currentElement, Tuple2<K,V> newElement)
    • replaceValue

      static <K, V, M extends Map<K, V>> M replaceValue(M map, K key, V value)
    • scan

      static <K, V, M extends Map<K, V>> M 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)
    • slideBy

      static <K, V, M extends Map<K, V>> Iterator<M> slideBy(M map, Maps.OfEntries<K,V,M> ofEntries, Function<? super Tuple2<K,V>,?> classifier)
    • sliding

      static <K, V, M extends Map<K, V>> Iterator<M> sliding(M map, Maps.OfEntries<K,V,M> ofEntries, int size)
    • sliding

      static <K, V, M extends Map<K, V>> Iterator<M> sliding(M map, Maps.OfEntries<K,V,M> ofEntries, int size, int step)
    • span

      static <K, V, M extends Map<K, V>> Tuple2<M,M> span(M map, Maps.OfEntries<K,V,M> ofEntries, Predicate<? super Tuple2<K,V>> predicate)
    • tailOption

      static <K, V, M extends Map<K, V>> Option<M> tailOption(M map)
    • take

      static <K, V, M extends Map<K, V>> M take(M map, Maps.OfEntries<K,V,M> ofEntries, int n)
    • takeRight

      static <K, V, M extends Map<K, V>> M takeRight(M map, Maps.OfEntries<K,V,M> ofEntries, int n)
    • takeUntil

      static <K, V, M extends Map<K, V>> M takeUntil(M map, Maps.OfEntries<K,V,M> ofEntries, Predicate<? super Tuple2<K,V>> predicate)
    • takeWhile

      static <K, V, M extends Map<K, V>> M takeWhile(M map, Maps.OfEntries<K,V,M> ofEntries, Predicate<? super Tuple2<K,V>> predicate)