Package | Description |
---|---|
io.vavr.collection |
Purely functional collections based on Traversable.
|
Modifier and Type | Interface and Description |
---|---|
interface |
SortedMultimap<K,V>
An immutable
SortedMultimap interface. |
Modifier and Type | Class and Description |
---|---|
class |
HashMultimap<K,V>
|
class |
LinkedHashMultimap<K,V>
A
LinkedHashMap -based implementation of Multimap |
class |
TreeMultimap<K,V>
|
Modifier and Type | Method and Description |
---|---|
<K2,V2> Multimap<K2,V2> |
Multimap.bimap(Function<? super K,? extends K2> keyMapper,
Function<? super V,? extends V2> valueMapper)
Maps this
Multimap to a new Multimap with different component type by applying a function to its elements. |
Multimap<K,V> |
Multimap.distinct() |
Multimap<K,V> |
Multimap.distinctBy(Comparator<? super Tuple2<K,V>> comparator) |
<U> Multimap<K,V> |
Multimap.distinctBy(Function<? super Tuple2<K,V>,? extends U> keyExtractor) |
Multimap<K,V> |
Multimap.drop(int n) |
Multimap<K,V> |
Multimap.dropRight(int n) |
Multimap<K,V> |
Multimap.dropUntil(Predicate<? super Tuple2<K,V>> predicate) |
Multimap<K,V> |
Multimap.dropWhile(Predicate<? super Tuple2<K,V>> predicate) |
Multimap<K,V> |
Multimap.filter(BiPredicate<? super K,? super V> predicate)
Returns a new Multimap consisting of all elements which satisfy the given predicate.
|
Multimap<K,V> |
Multimap.filter(Predicate<? super Tuple2<K,V>> predicate) |
Multimap<K,V> |
Multimap.filterKeys(Predicate<? super K> predicate)
Returns a new Multimap consisting of all elements with keys which satisfy the given predicate.
|
Multimap<K,V> |
Multimap.filterValues(Predicate<? super V> predicate)
Returns a new Multimap consisting of all elements with values which satisfy the given predicate.
|
<K2,V2> Multimap<K2,V2> |
Multimap.flatMap(BiFunction<? super K,? super V,? extends Iterable<Tuple2<K2,V2>>> mapper)
FlatMaps this
Multimap to a new Multimap with different component type. |
Multimap<K,V> |
Multimap.init() |
<K2,V2> Multimap<K2,V2> |
Multimap.map(BiFunction<? super K,? super V,Tuple2<K2,V2>> mapper)
Maps the entries of this
Multimap to form a new Multimap . |
<V2> Multimap<K,V2> |
Multimap.mapValues(Function<? super V,? extends V2> valueMapper)
Maps the values of this
Multimap while preserving the corresponding keys. |
Multimap<K,V> |
Multimap.merge(Multimap<? extends K,? extends V> that)
Creates a new multimap which by merging the entries of
this multimap and that multimap. |
<K2 extends K,V2 extends V> |
Multimap.merge(Multimap<K2,V2> that,
BiFunction<Traversable<V>,Traversable<V2>,Traversable<V>> collisionResolution)
Creates a new multimap which by merging the entries of
this multimap and that multimap. |
static <K,V> Multimap<K,V> |
Multimap.narrow(Multimap<? extends K,? extends V> map)
Narrows a widened
Multimap<? extends K, ? extends V> to Multimap<K, V>
by performing a type-safe cast. |
Multimap<K,V> |
Multimap.orElse(Iterable<? extends Tuple2<K,V>> other) |
Multimap<K,V> |
Multimap.orElse(Supplier<? extends Iterable<? extends Tuple2<K,V>>> supplier) |
Multimap<K,V> |
Multimap.peek(Consumer<? super Tuple2<K,V>> action) |
Multimap<K,V> |
Multimap.put(K key,
V value)
Associates the specified value with the specified key in this multimap.
|
Multimap<K,V> |
Multimap.put(Tuple2<? extends K,? extends V> entry)
Convenience method for
put(entry._1, entry._2) . |
Multimap<K,V> |
Multimap.remove(K key)
Removes the mapping for a key from this multimap if it is present.
|
Multimap<K,V> |
Multimap.remove(K key,
V value)
Removes the key-value pair from this multimap if it is present.
|
Multimap<K,V> |
Multimap.removeAll(BiPredicate<? super K,? super V> predicate)
Returns a new Multimap consisting of all elements which do not satisfy the given predicate.
|
Multimap<K,V> |
Multimap.removeAll(Iterable<? extends K> keys)
Removes the mapping for a key from this multimap if it is present.
|
Multimap<K,V> |
Multimap.removeKeys(Predicate<? super K> predicate)
Returns a new Multimap consisting of all elements with keys which do not satisfy the given predicate.
|
Multimap<K,V> |
Multimap.removeValues(Predicate<? super V> predicate)
Returns a new Multimap consisting of all elements with values which do not satisfy the given predicate.
|
Multimap<K,V> |
Multimap.replace(K key,
V oldValue,
V newValue)
Replaces the entry with the specified key and oldValue.
|
Multimap<K,V> |
Multimap.replace(Tuple2<K,V> currentElement,
Tuple2<K,V> newElement) |
Multimap<K,V> |
Multimap.replaceAll(BiFunction<? super K,? super V,? extends V> function)
Replaces each entry's values with the result of invoking the given function on that each tuple until all entries have been processed or the function throws an exception.
|
Multimap<K,V> |
Multimap.replaceAll(Tuple2<K,V> currentElement,
Tuple2<K,V> newElement) |
Multimap<K,V> |
Multimap.replaceValue(K key,
V value)
Replaces the entry for the specified key only if it is currently mapped to some value.
|
Multimap<K,V> |
Multimap.retainAll(Iterable<? extends Tuple2<K,V>> elements) |
Multimap<K,V> |
Multimap.scan(Tuple2<K,V> zero,
BiFunction<? super Tuple2<K,V>,? super Tuple2<K,V>,? extends Tuple2<K,V>> operation) |
Multimap<K,V> |
Multimap.tail() |
Multimap<K,V> |
Multimap.take(int n) |
Multimap<K,V> |
Multimap.takeRight(int n) |
Multimap<K,V> |
Multimap.takeUntil(Predicate<? super Tuple2<K,V>> predicate) |
Multimap<K,V> |
Multimap.takeWhile(Predicate<? super Tuple2<K,V>> predicate) |
Modifier and Type | Method and Description |
---|---|
<K,V2 extends V> |
LinkedHashMultimap.Builder.collector() |
<K,V2 extends V> |
HashMultimap.Builder.collector() |
<C> Map<C,? extends Multimap<K,V>> |
Multimap.groupBy(Function<? super Tuple2<K,V>,? extends C> classifier) |
Iterator<? extends Multimap<K,V>> |
Multimap.grouped(int size) |
Option<? extends Multimap<K,V>> |
Multimap.initOption() |
Tuple2<? extends Multimap<K,V>,? extends Multimap<K,V>> |
Multimap.partition(Predicate<? super Tuple2<K,V>> predicate) |
Tuple2<? extends Multimap<K,V>,? extends Multimap<K,V>> |
Multimap.partition(Predicate<? super Tuple2<K,V>> predicate) |
Iterator<? extends Multimap<K,V>> |
Multimap.slideBy(Function<? super Tuple2<K,V>,?> classifier) |
Iterator<? extends Multimap<K,V>> |
Multimap.sliding(int size) |
Iterator<? extends Multimap<K,V>> |
Multimap.sliding(int size,
int step) |
Tuple2<? extends Multimap<K,V>,? extends Multimap<K,V>> |
Multimap.span(Predicate<? super Tuple2<K,V>> predicate) |
Tuple2<? extends Multimap<K,V>,? extends Multimap<K,V>> |
Multimap.span(Predicate<? super Tuple2<K,V>> predicate) |
Option<? extends Multimap<K,V>> |
Multimap.tailOption() |
Modifier and Type | Method and Description |
---|---|
SortedMultimap<K,V> |
SortedMultimap.merge(Multimap<? extends K,? extends V> that) |
Multimap<K,V> |
Multimap.merge(Multimap<? extends K,? extends V> that)
Creates a new multimap which by merging the entries of
this multimap and that multimap. |
<K2 extends K,V2 extends V> |
SortedMultimap.merge(Multimap<K2,V2> that,
BiFunction<Traversable<V>,Traversable<V2>,Traversable<V>> collisionResolution) |
<K2 extends K,V2 extends V> |
Multimap.merge(Multimap<K2,V2> that,
BiFunction<Traversable<V>,Traversable<V2>,Traversable<V>> collisionResolution)
Creates a new multimap which by merging the entries of
this multimap and that multimap. |
static <K,V> Multimap<K,V> |
Multimap.narrow(Multimap<? extends K,? extends V> map)
Narrows a widened
Multimap<? extends K, ? extends V> to Multimap<K, V>
by performing a type-safe cast. |
Modifier and Type | Method and Description |
---|---|
default <U> U |
Multimap.transform(Function<? super Multimap<K,V>,? extends U> f)
Transforms this
Multimap . |
Copyright © 2017. All Rights Reserved.