public interface ImSortedMap<K,V> extends UnmodSortedMap<K,V>, BaseMap<K,V>
UnmodMap.UnEntry<K,V>
Modifier and Type | Method and Description |
---|---|
ImSortedMap<K,V> |
assoc(K key,
V val)
Returns a new map with the given key/value added.
|
default ImSortedMap<K,V> |
assoc(Map.Entry<K,V> entry)
Returns a new map with an immutable copy of the given entry added
|
default boolean |
containsKey(Object key) |
Option<UnmodMap.UnEntry<K,V>> |
entry(K key)
Returns an option of the key/value pair associated with this key
|
ImSortedSet<Map.Entry<K,V>> |
entrySet()
Returns a view of the mappings contained in this map.
|
default V |
get(Object key) |
default V |
getOrElse(K key,
V notFound) |
default ImSortedMap<K,V> |
headMap(K toKey)
Return the elements in this map up (but excluding) to the given element
|
UnmodSortedIterator<UnmodMap.UnEntry<K,V>> |
iterator()
Returns an iterator over the UnEntries of this map in order.
|
default ImSortedSet<K> |
keySet()
Returns a view of the keys contained in this map.
|
ImSortedMap<K,V> |
subMap(K fromKey,
K toKey)
Return the elements in this map from the start element (inclusive) to the end element
(exclusive)
|
ImSortedMap<K,V> |
tailMap(K fromKey)
Return the elements in this from the given element to the end
|
ImSortedMap<K,V> |
without(K key)
Returns a new map with the given key/value removed
|
keyIterator, valIterator, values
comparator, firstKey, lastKey
castFromList, castFromSortedMap, castFromSortedSet, equal
clear, compute, computeIfAbsent, computeIfPresent, containsValue, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll
concat, drop, dropWhile, filter, flatMap, fold, foldUntil, hash, head, map, precat, take, takeWhile, toString
forEach, spliterator
toImList, toImMap, toImRrbt, toImSet, toImSortedMap, toImSortedSet, toMutableList, toMutableMap, toMutableRrbt, toMutableSet, toMutableSortedMap, toMutableSortedSet
Option<UnmodMap.UnEntry<K,V>> entry(K key)
BaseMap
default boolean containsKey(Object key)
containsKey
in interface BaseMap<K,V>
containsKey
in interface Map<K,V>
ImSortedSet<Map.Entry<K,V>> entrySet()
default ImSortedMap<K,V> headMap(K toKey)
UnmodSortedIterator<UnmodMap.UnEntry<K,V>> iterator()
iterator
in interface Iterable<UnmodMap.UnEntry<K,V>>
iterator
in interface UnmodIterable<UnmodMap.UnEntry<K,V>>
iterator
in interface UnmodSortedIterable<UnmodMap.UnEntry<K,V>>
default ImSortedSet<K> keySet()
ImSortedMap<K,V> subMap(K fromKey, K toKey)
ImSortedMap<K,V> tailMap(K fromKey)
ImSortedMap<K,V> assoc(K key, V val)
assoc
in interface BaseMap<K,V>
key
- the key used to look up the value. In the case of a duplicate key, later values
overwrite the earlier ones. The resulting map can contain zero or one null key (if your
comparator knows how to sort nulls) and any number of null values.val
- the value to store in this key.default ImSortedMap<K,V> assoc(Map.Entry<K,V> entry)
Copyright © 2019. All rights reserved.