Package | Description |
---|---|
io.vavr.collection |
Purely functional collections based on Traversable.
|
Modifier and Type | Method and Description |
---|---|
<K2,V2> HashMap<K2,V2> |
HashMap.bimap(Function<? super K,? extends K2> keyMapper,
Function<? super V,? extends V2> valueMapper) |
HashMap<K,V> |
HashMap.distinct() |
HashMap<K,V> |
HashMap.distinctBy(Comparator<? super Tuple2<K,V>> comparator) |
<U> HashMap<K,V> |
HashMap.distinctBy(Function<? super Tuple2<K,V>,? extends U> keyExtractor) |
HashMap<K,V> |
HashMap.drop(int n) |
HashMap<K,V> |
HashMap.dropRight(int n) |
HashMap<K,V> |
HashMap.dropUntil(Predicate<? super Tuple2<K,V>> predicate) |
HashMap<K,V> |
HashMap.dropWhile(Predicate<? super Tuple2<K,V>> predicate) |
static <K,V> HashMap<K,V> |
HashMap.empty() |
static <K,V> HashMap<K,V> |
HashMap.fill(int n,
Supplier<? extends Tuple2<? extends K,? extends V>> s)
Returns a HashMap containing tuples returned by
n calls to a given Supplier s . |
HashMap<K,V> |
HashMap.filter(BiPredicate<? super K,? super V> predicate) |
HashMap<K,V> |
HashMap.filter(Predicate<? super Tuple2<K,V>> predicate) |
HashMap<K,V> |
HashMap.filterKeys(Predicate<? super K> predicate) |
HashMap<K,V> |
HashMap.filterValues(Predicate<? super V> predicate) |
<K2,V2> HashMap<K2,V2> |
HashMap.flatMap(BiFunction<? super K,? super V,? extends Iterable<Tuple2<K2,V2>>> mapper) |
HashMap<K,V> |
HashMap.init() |
<K2,V2> HashMap<K2,V2> |
HashMap.map(BiFunction<? super K,? super V,Tuple2<K2,V2>> mapper) |
<K2> HashMap<K2,V> |
HashMap.mapKeys(Function<? super K,? extends K2> keyMapper) |
<K2> HashMap<K2,V> |
HashMap.mapKeys(Function<? super K,? extends K2> keyMapper,
BiFunction<? super V,? super V,? extends V> valueMerge) |
<V2> HashMap<K,V2> |
HashMap.mapValues(Function<? super V,? extends V2> valueMapper) |
HashMap<K,V> |
HashMap.merge(Map<? extends K,? extends V> that) |
<U extends V> |
HashMap.merge(Map<? extends K,U> that,
BiFunction<? super V,? super U,? extends V> collisionResolution) |
static <K,V> HashMap<K,V> |
HashMap.narrow(HashMap<? extends K,? extends V> hashMap)
Narrows a widened
HashMap<? extends K, ? extends V> to HashMap<K, V>
by performing a type-safe cast. |
static <K,V> HashMap<K,V> |
HashMap.of(K key,
V value)
Returns a singleton
HashMap , i.e. |
static <K,V> HashMap<K,V> |
HashMap.of(K k1,
V v1,
K k2,
V v2)
Creates a HashMap of the given list of key-value pairs.
|
static <K,V> HashMap<K,V> |
HashMap.of(K k1,
V v1,
K k2,
V v2,
K k3,
V v3)
Creates a HashMap of the given list of key-value pairs.
|
static <K,V> HashMap<K,V> |
HashMap.of(K k1,
V v1,
K k2,
V v2,
K k3,
V v3,
K k4,
V v4)
Creates a HashMap of the given list of key-value pairs.
|
static <K,V> HashMap<K,V> |
HashMap.of(K k1,
V v1,
K k2,
V v2,
K k3,
V v3,
K k4,
V v4,
K k5,
V v5)
Creates a HashMap of the given list of key-value pairs.
|
static <K,V> HashMap<K,V> |
HashMap.of(K k1,
V v1,
K k2,
V v2,
K k3,
V v3,
K k4,
V v4,
K k5,
V v5,
K k6,
V v6)
Creates a HashMap of the given list of key-value pairs.
|
static <K,V> HashMap<K,V> |
HashMap.of(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)
Creates a HashMap of the given list of key-value pairs.
|
static <K,V> HashMap<K,V> |
HashMap.of(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)
Creates a HashMap of the given list of key-value pairs.
|
static <K,V> HashMap<K,V> |
HashMap.of(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)
Creates a HashMap of the given list of key-value pairs.
|
static <K,V> HashMap<K,V> |
HashMap.of(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)
Creates a HashMap of the given list of key-value pairs.
|
static <K,V> HashMap<K,V> |
HashMap.of(Tuple2<? extends K,? extends V> entry)
Returns a singleton
HashMap , i.e. |
static <K,V> HashMap<K,V> |
HashMap.ofAll(Map<? extends K,? extends V> map)
Returns a
HashMap , from a source java.util.Map. |
static <T,K,V> HashMap<K,V> |
HashMap.ofAll(Stream<? extends T> stream,
Function<? super T,? extends K> keyMapper,
Function<? super T,? extends V> valueMapper)
Returns a
HashMap , from entries mapped from stream. |
static <T,K,V> HashMap<K,V> |
HashMap.ofAll(Stream<? extends T> stream,
Function<? super T,Tuple2<? extends K,? extends V>> entryMapper)
Returns a
HashMap , from entries mapped from stream. |
static <K,V> HashMap<K,V> |
HashMap.ofEntries(Iterable<? extends Tuple2<? extends K,? extends V>> entries)
Creates a HashMap of the given entries.
|
static <K,V> HashMap<K,V> |
HashMap.ofEntries(Map.Entry<? extends K,? extends V>... entries)
Creates a HashMap of the given entries.
|
static <K,V> HashMap<K,V> |
HashMap.ofEntries(Tuple2<? extends K,? extends V>... entries)
Creates a HashMap of the given entries.
|
HashMap<K,V> |
HashMap.orElse(Iterable<? extends Tuple2<K,V>> other) |
HashMap<K,V> |
HashMap.orElse(Supplier<? extends Iterable<? extends Tuple2<K,V>>> supplier) |
HashMap<K,V> |
HashMap.peek(Consumer<? super Tuple2<K,V>> action) |
<U extends V> |
HashMap.put(K key,
U value,
BiFunction<? super V,? super U,? extends V> merge) |
HashMap<K,V> |
HashMap.put(K key,
V value) |
HashMap<K,V> |
HashMap.put(Tuple2<? extends K,? extends V> entry) |
<U extends V> |
HashMap.put(Tuple2<? extends K,U> entry,
BiFunction<? super V,? super U,? extends V> merge) |
HashMap<K,V> |
HashMap.reject(BiPredicate<? super K,? super V> predicate) |
HashMap<K,V> |
HashMap.reject(Predicate<? super Tuple2<K,V>> predicate) |
HashMap<K,V> |
HashMap.rejectKeys(Predicate<? super K> predicate) |
HashMap<K,V> |
HashMap.rejectValues(Predicate<? super V> predicate) |
HashMap<K,V> |
HashMap.remove(K key) |
HashMap<K,V> |
HashMap.removeAll(BiPredicate<? super K,? super V> predicate)
Deprecated.
|
HashMap<K,V> |
HashMap.removeAll(Iterable<? extends K> keys) |
HashMap<K,V> |
HashMap.removeKeys(Predicate<? super K> predicate)
Deprecated.
|
HashMap<K,V> |
HashMap.removeValues(Predicate<? super V> predicate)
Deprecated.
|
HashMap<K,V> |
HashMap.replace(K key,
V oldValue,
V newValue) |
HashMap<K,V> |
HashMap.replace(Tuple2<K,V> currentElement,
Tuple2<K,V> newElement) |
HashMap<K,V> |
HashMap.replaceAll(BiFunction<? super K,? super V,? extends V> function) |
HashMap<K,V> |
HashMap.replaceAll(Tuple2<K,V> currentElement,
Tuple2<K,V> newElement) |
HashMap<K,V> |
HashMap.replaceValue(K key,
V value) |
HashMap<K,V> |
HashMap.retainAll(Iterable<? extends Tuple2<K,V>> elements) |
HashMap<K,V> |
HashMap.scan(Tuple2<K,V> zero,
BiFunction<? super Tuple2<K,V>,? super Tuple2<K,V>,? extends Tuple2<K,V>> operation) |
static <K,V> HashMap<K,V> |
HashMap.tabulate(int n,
Function<? super Integer,? extends Tuple2<? extends K,? extends V>> f)
Returns an HashMap containing
n values of a given Function f
over a range of integer values from 0 to n - 1 . |
HashMap<K,V> |
HashMap.tail() |
HashMap<K,V> |
HashMap.take(int n) |
HashMap<K,V> |
HashMap.takeRight(int n) |
HashMap<K,V> |
HashMap.takeUntil(Predicate<? super Tuple2<K,V>> predicate) |
HashMap<K,V> |
HashMap.takeWhile(Predicate<? super Tuple2<K,V>> predicate) |
Modifier and Type | Method and Description |
---|---|
static <K,V> Collector<Tuple2<K,V>,ArrayList<Tuple2<K,V>>,HashMap<K,V>> |
HashMap.collector()
Returns a
Collector which may be used in conjunction with
Stream.collect(java.util.stream.Collector) to obtain a HashMap . |
static <K,V,T extends V> |
HashMap.collector(Function<? super T,? extends K> keyMapper)
Returns a
Collector which may be used in conjunction with
Stream.collect(java.util.stream.Collector) to obtain a HashMap . |
static <K,V,T> Collector<T,ArrayList<T>,HashMap<K,V>> |
HashMap.collector(Function<? super T,? extends K> keyMapper,
Function<? super T,? extends V> valueMapper)
Returns a
Collector which may be used in conjunction with
Stream.collect(java.util.stream.Collector) to obtain a HashMap . |
Tuple2<V,HashMap<K,V>> |
HashMap.computeIfAbsent(K key,
Function<? super K,? extends V> mappingFunction) |
Tuple2<Option<V>,HashMap<K,V>> |
HashMap.computeIfPresent(K key,
BiFunction<? super K,? super V,? extends V> remappingFunction) |
<C> Map<C,HashMap<K,V>> |
HashMap.groupBy(Function<? super Tuple2<K,V>,? extends C> classifier) |
Iterator<HashMap<K,V>> |
HashMap.grouped(int size) |
Option<HashMap<K,V>> |
HashMap.initOption() |
Tuple2<HashMap<K,V>,HashMap<K,V>> |
HashMap.partition(Predicate<? super Tuple2<K,V>> predicate) |
Tuple2<HashMap<K,V>,HashMap<K,V>> |
HashMap.partition(Predicate<? super Tuple2<K,V>> predicate) |
Iterator<HashMap<K,V>> |
HashMap.slideBy(Function<? super Tuple2<K,V>,?> classifier) |
Iterator<HashMap<K,V>> |
HashMap.sliding(int size) |
Iterator<HashMap<K,V>> |
HashMap.sliding(int size,
int step) |
Tuple2<HashMap<K,V>,HashMap<K,V>> |
HashMap.span(Predicate<? super Tuple2<K,V>> predicate) |
Tuple2<HashMap<K,V>,HashMap<K,V>> |
HashMap.span(Predicate<? super Tuple2<K,V>> predicate) |
Option<HashMap<K,V>> |
HashMap.tailOption() |
Modifier and Type | Method and Description |
---|---|
static <K,V> HashMap<K,V> |
HashMap.narrow(HashMap<? extends K,? extends V> hashMap)
Narrows a widened
HashMap<? extends K, ? extends V> to HashMap<K, V>
by performing a type-safe cast. |
Copyright © 2019. All Rights Reserved.