Package com.landawn.abacus.util
Class ImmutableSortedMap<K,V>
java.lang.Object
java.util.AbstractMap<K,V>
com.landawn.abacus.util.ImmutableMap<K,V>
com.landawn.abacus.util.ImmutableSortedMap<K,V>
- Type Parameters:
K
- the key typeV
- the value type
- Direct Known Subclasses:
ImmutableNavigableMap
- Since:
- 1.1.4
- Author:
- Haiyang Li
-
Nested Class Summary
Nested classes/interfaces inherited from class com.landawn.abacus.util.ImmutableMap
ImmutableMap.Builder<K,
V> Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,
V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object, V extends Object> -
Method Summary
Modifier and TypeMethodDescriptionComparator<? super K>
static <K,
V> ImmutableMap<K, V> Deprecated.static <K,
V> ImmutableSortedMap<K, V> static <K,
V> ImmutableSortedMap<K, V> empty()
firstKey()
lastKey()
static <K,
V> ImmutableMap<K, V> Deprecated.throwsUnsupportedOperationException
static <K,
V> ImmutableSortedMap<K, V> static <K extends Comparable<? super K>,
V>
ImmutableSortedMap<K,V> of
(K k1, V v1) static <K extends Comparable<? super K>,
V>
ImmutableSortedMap<K,V> of
(K k1, V v1, K k2, V v2) static <K extends Comparable<? super K>,
V>
ImmutableSortedMap<K,V> of
(K k1, V v1, K k2, V v2, K k3, V v3) static <K extends Comparable<? super K>,
V>
ImmutableSortedMap<K,V> of
(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4) static <K extends Comparable<? super K>,
V>
ImmutableSortedMap<K,V> of
(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5) static <K extends Comparable<? super K>,
V>
ImmutableSortedMap<K,V> 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) static <K extends Comparable<? super K>,
V>
ImmutableSortedMap<K,V> 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) Methods inherited from class com.landawn.abacus.util.ImmutableMap
builder, builder, clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, get, getOrDefault, isEmpty, keySet, merge, of, of, of, of, of, of, of, put, putAll, putIfAbsent, remove, remove, replace, replace, size, values
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
Methods inherited from interface java.util.Map
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, equals, forEach, get, getOrDefault, hashCode, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size
-
Method Details
-
empty
- Type Parameters:
K
- the key typeV
- the value type- Returns:
-
of
- Type Parameters:
K
- the key typeV
- the value typek
-v
-- Parameters:
k1
-v1
-- Returns:
-
of
public static <K extends Comparable<? super K>,V> ImmutableSortedMap<K,V> of(K k1, V v1, K k2, V v2) - Type Parameters:
K
- the key typeV
- the value typek
-v
-- Parameters:
k1
-v1
-k2
-v2
-- Returns:
-
of
public static <K extends Comparable<? super K>,V> ImmutableSortedMap<K,V> of(K k1, V v1, K k2, V v2, K k3, V v3) - Type Parameters:
K
- the key typeV
- the value typek
-v
-- Parameters:
k1
-v1
-k2
-v2
-k3
-v3
-- Returns:
-
of
public static <K extends Comparable<? super K>,V> ImmutableSortedMap<K,V> of(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4) - Type Parameters:
K
- the key typeV
- the value typek
-v
-- Parameters:
k1
-v1
-k2
-v2
-k3
-v3
-k4
-v4
-- Returns:
-
of
public static <K extends Comparable<? super K>,V> ImmutableSortedMap<K,V> of(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5) - Type Parameters:
K
- the key typeV
- the value typek
-v
-- Parameters:
k1
-v1
-k2
-v2
-k3
-v3
-k4
-v4
-k5
-v5
-- Returns:
-
of
public static <K extends Comparable<? super K>,V> ImmutableSortedMap<K,V> 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) - Type Parameters:
K
- the key typeV
- the value typek
-v
-- Parameters:
k1
-v1
-k2
-v2
-k3
-v3
-k4
-v4
-k5
-v5
-k6
-v6
-- Returns:
-
of
public static <K extends Comparable<? super K>,V> ImmutableSortedMap<K,V> 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) - Type Parameters:
K
- the key typeV
- the value typek
-v
-- Parameters:
k1
-v1
-k2
-v2
-k3
-v3
-k4
-v4
-k5
-v5
-k6
-v6
-k7
-v7
-- Returns:
-
of
- Type Parameters:
K
- the key typeV
- the value type- Parameters:
sortedMap
- the elements in thismap
are shared by the returned ImmutableSortedMap.- Returns:
-
copyOf
- Type Parameters:
K
- the key typeV
- the value type- Parameters:
sortedMap
-- Returns:
-
of
@Deprecated public static <K,V> ImmutableMap<K,V> of(Map<? extends K, ? extends V> map) throws UnsupportedOperationExceptionDeprecated.throwsUnsupportedOperationException
- Type Parameters:
K
- the key typeV
- the value type- Parameters:
map
-- Returns:
- Throws:
UnsupportedOperationException
-
copyOf
@Deprecated public static <K,V> ImmutableMap<K,V> copyOf(Map<? extends K, ? extends V> map) throws UnsupportedOperationExceptionDeprecated.throwsUnsupportedOperationException
- Type Parameters:
K
- the key typeV
- the value type- Parameters:
map
-- Returns:
- Throws:
UnsupportedOperationException
-
comparator
- Specified by:
comparator
in interfaceSortedMap<K,
V>
-
subMap
-
headMap
-
tailMap
-
firstKey
-
lastKey
-
UnsupportedOperationException