Package com.github.tonivade.purefun.data
Interface ImmutableMap<K,V>
- Type Parameters:
K- the type of keys maintained by this mapV- the type of mapped values
- All Known Subinterfaces:
ImmutableTreeMap<K,V>
- All Known Implementing Classes:
ImmutableMap.PImmutableMap,ImmutableTreeMap.PImmutableTreeMap
Similar to a HashMap
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classstatic final class -
Method Summary
Modifier and TypeMethodDescriptiondefault <A,B> ImmutableMap <A, B> static <K,V> ImmutableMap.Builder <K, V> builder()default booleancontainsKey(K key) static <K,V> ImmutableMap <K, V> empty()ImmutableSet<Tuple2<K, V>> entries()static <K,V> Tuple2 <K, V> entry(K key, V value) default ImmutableMap<K, V> filterKeys(Matcher1<? super K> filter) default ImmutableMap<K, V> filterValues(Matcher1<? super V> filter) default voidstatic <K,V> ImmutableMap <K, V> from(ImmutableSet<Tuple2<K, V>> entries) static <K,V> ImmutableMap <K, V> static <K,V> ImmutableMap <K, V> static <K,V> ImmutableMap <K, V> static <K,V> ImmutableMap <K, V> default VgetOrDefault(K key, Producer<? extends V> supplier) default booleanisEmpty()iterator()keys()default <A> ImmutableMap<A, V> default <A> ImmutableMap<K, A> static <K,V> ImmutableMap <K, V> putAll(ImmutableMap<? extends K, ? extends V> other) default ImmutableMap<K, V> putIfAbsent(K key, V value) intsize()private static <V> VthrowingMerge(V a, V b) static <T,K, V> Collector <T, ?, ImmutableMap<K, V>> toImmutableMap(Function1<? super T, ? extends K> keyMapper, Function1<? super T, ? extends V> valueMapper) private static <T,K, V> Collector <T, ?, ? extends LinkedHashMap<K, V>> toLinkedHashMap(Function1<? super T, ? extends K> keyMapper, Function1<? super T, ? extends V> valueMapper) toMap()values()Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Method Details
-
toMap
-
put
-
putAll
-
remove
-
removeAll
-
get
-
values
-
keys
ImmutableSet<K> keys() -
entries
ImmutableSet<Tuple2<K,V>> entries() -
merge
-
size
int size() -
iterator
-
forEach
-
bimap
default <A,B> ImmutableMap<A,B> bimap(Function1<? super K, ? extends A> keyMapper, Function1<? super V, ? extends B> valueMapper) -
mapKeys
-
mapValues
-
filterKeys
-
filterValues
-
containsKey
-
putIfAbsent
-
getOrDefault
-
isEmpty
default boolean isEmpty() -
of
-
entry
-
from
-
empty
-
from
-
from
-
from
-
from
-
toImmutableMap
static <T,K, Collector<T,V> ?, toImmutableMapImmutableMap<K, V>> (Function1<? super T, ? extends K> keyMapper, Function1<? super T, ? extends V> valueMapper) -
builder
-
toLinkedHashMap
private static <T,K, Collector<T,V> ?, toLinkedHashMap? extends LinkedHashMap<K, V>> (Function1<? super T, ? extends K> keyMapper, Function1<? super T, ? extends V> valueMapper) -
throwingMerge
private static <V> V throwingMerge(V a, V b)
-