Home
last modified time | relevance | path

Searched refs:K (Results 1 – 25 of 97) sorted by relevance

1234

/libcore/ojluni/annotations/flagged_api/java/util/
DMap.annotated.java30 public interface Map<K, V> {
42 public V put(K key, V value); in put()
46 public void putAll(java.util.Map<? extends K,? extends V> m); in putAll() argument
50 public java.util.Set<K> keySet(); in keySet()
54 public java.util.Set<java.util.Map.Entry<K,V>> entrySet(); in entrySet()
62 public default void forEach(java.util.function.BiConsumer<? super K,? super V> action) { throw new … in forEach() argument
64 public default void replaceAll(java.util.function.BiFunction<? super K,? super V,? extends V> funct… in replaceAll() argument
66 public default V putIfAbsent(K key, V value) { throw new RuntimeException("Stub!"); } in putIfAbsent()
70 public default boolean replace(K key, V oldValue, V newValue) { throw new RuntimeException("Stub!")… in replace()
72 public default V replace(K key, V value) { throw new RuntimeException("Stub!"); } in replace()
[all …]
DNavigableMap.annotated.java40 public interface NavigableMap<K, V> extends java.util.SortedMap<K,V> {
42 public java.util.Map.Entry<K,V> lowerEntry(K key); in lowerEntry()
44 public K lowerKey(K key); in lowerKey()
46 public java.util.Map.Entry<K,V> floorEntry(K key); in floorEntry()
48 public K floorKey(K key); in floorKey()
50 public java.util.Map.Entry<K,V> ceilingEntry(K key); in ceilingEntry()
52 public K ceilingKey(K key); in ceilingKey()
54 public java.util.Map.Entry<K,V> higherEntry(K key); in higherEntry()
56 public K higherKey(K key); in higherKey()
58 public java.util.Map.Entry<K,V> firstEntry(); in firstEntry()
[all …]
DTreeMap.annotated.java31 public class TreeMap<K, V> extends java.util.AbstractMap<K,V> implements java.util.NavigableMap<K,V…
35 public TreeMap(java.util.Comparator<? super K> comparator) { throw new RuntimeException("Stub!"); } in TreeMap()
37 public TreeMap(java.util.Map<? extends K,? extends V> m) { throw new RuntimeException("Stub!"); } in TreeMap() argument
39 public TreeMap(java.util.SortedMap<K,? extends V> m) { throw new RuntimeException("Stub!"); } in TreeMap() argument
49 public java.util.Comparator<? super K> comparator() { throw new RuntimeException("Stub!"); } in comparator()
51 public K firstKey() { throw new RuntimeException("Stub!"); } in firstKey()
53 public K lastKey() { throw new RuntimeException("Stub!"); } in lastKey()
56 public V putFirst(K k, V v) { throw new RuntimeException("Stub!"); } in putFirst()
59 public V putLast(K k, V v) { throw new RuntimeException("Stub!"); } in putLast()
61 public void putAll(java.util.Map<? extends K,? extends V> map) { throw new RuntimeException("Stub!"… in putAll() argument
[all …]
DSortedMap.annotated.java30 public interface SortedMap<K, V> extends java.util.SequencedMap<K,V>, java.util.Map<K,V> {
32 public java.util.Comparator<? super K> comparator(); in comparator()
34 public java.util.SortedMap<K,V> subMap(K fromKey, K toKey); in subMap()
36 public java.util.SortedMap<K,V> headMap(K toKey); in headMap()
38 public java.util.SortedMap<K,V> tailMap(K fromKey); in tailMap()
40 public K firstKey(); in firstKey()
42 public K lastKey(); in lastKey()
44 public java.util.Set<K> keySet(); in keySet()
48 public java.util.Set<java.util.Map.Entry<K,V>> entrySet(); in entrySet()
50 public default V putFirst(K k, V v) { throw new RuntimeException("Stub!"); } in putFirst()
[all …]
/libcore/ojluni/src/main/java/java/util/
DNavigableMap.java103 public interface NavigableMap<K,V> extends SortedMap<K,V> {
117 Map.Entry<K,V> lowerEntry(K key); in lowerEntry()
131 K lowerKey(K key); in lowerKey()
146 Map.Entry<K,V> floorEntry(K key); in floorEntry()
160 K floorKey(K key); in floorKey()
175 Map.Entry<K,V> ceilingEntry(K key); in ceilingEntry()
189 K ceilingKey(K key); in ceilingKey()
204 Map.Entry<K,V> higherEntry(K key); in higherEntry()
218 K higherKey(K key); in higherKey()
227 Map.Entry<K,V> firstEntry(); in firstEntry()
[all …]
DMap.java161 public interface Map<K, V> {
273 V put(K key, V value); in put()
329 void putAll(Map<? extends K, ? extends V> m); in putAll() argument
358 Set<K> keySet(); in keySet()
393 Set<Map.Entry<K, V>> entrySet(); in entrySet()
427 interface Entry<K, V> {
436 K getKey(); in getKey()
522 … public static <K extends Comparable<? super K>, V> Comparator<Map.Entry<K, V>> comparingByKey() { in comparingByKey()
523 return (Comparator<Map.Entry<K, V>> & Serializable) in comparingByKey()
539 …public static <K, V extends Comparable<? super V>> Comparator<Map.Entry<K, V>> comparingByValue() { in comparingByValue()
[all …]
DReverseOrderSortedMapView.java33 class ReverseOrderSortedMapView<K, V> extends AbstractMap<K, V> implements SortedMap<K, V> {
34 final SortedMap<K, V> base;
35 final Comparator<? super K> cmp;
37 private ReverseOrderSortedMapView(SortedMap<K, V> map) { in ReverseOrderSortedMapView() argument
42 public static <K, V> SortedMap<K, V> of(SortedMap<K, V> map) { in of() argument
43 if (map instanceof ReverseOrderSortedMapView<K, V> rosmv) { in of()
82 public V put(K key, V value) { in put()
86 public void putAll(Map<? extends K, ? extends V> m) { in putAll() argument
98 public Set<K> keySet() { in keySet()
101 public Iterator<K> iterator() { return descendingKeyIterator(base); } in keySet()
[all …]
DTreeMap.java124 public class TreeMap<K,V>
125 extends AbstractMap<K,V>
126 implements NavigableMap<K,V>, Cloneable, java.io.Serializable
135 private final Comparator<? super K> comparator;
137 private transient TreeMapEntry<K,V> root;
179 public TreeMap(Comparator<? super K> comparator) { in TreeMap()
197 public TreeMap(Map<? extends K, ? extends V> m) { in TreeMap() argument
211 public TreeMap(SortedMap<K, ? extends V> m) { in TreeMap() argument
262 for (TreeMapEntry<K,V> e = getFirstEntry(); e != null; e = successor(e)) in containsValue()
291 TreeMapEntry<K,V> p = getEntry(key); in get()
[all …]
DSortedMap.java113 public interface SortedMap<K,V> extends SequencedMap<K,V>, Map<K,V> {
123 Comparator<? super K> comparator(); in comparator()
154 SortedMap<K,V> subMap(K fromKey, K toKey); in subMap()
181 SortedMap<K,V> headMap(K toKey); in headMap()
208 SortedMap<K,V> tailMap(K fromKey); in tailMap()
216 K firstKey(); in firstKey()
224 K lastKey(); in lastKey()
243 Set<K> keySet(); in keySet()
283 Set<Map.Entry<K, V>> entrySet(); in entrySet()
296 default V putFirst(K k, V v) { in putFirst()
[all …]
DLinkedHashMap.java194 public class LinkedHashMap<K,V>
195 extends HashMap<K,V>
196 implements SequencedMap<K,V>, Map<K, V>
223 static class Entry<K,V> extends HashMap.Node<K,V> {
224 Entry<K,V> before, after;
225 Entry(int hash, K key, V value, Node<K,V> next) { in Entry() argument
236 transient LinkedHashMap.Entry<K,V> head;
241 transient LinkedHashMap.Entry<K,V> tail;
254 private void linkNodeAtEnd(LinkedHashMap.Entry<K,V> p) { in linkNodeAtEnd() argument
256 LinkedHashMap.Entry<K,V> first = head; in linkNodeAtEnd()
[all …]
DWeakHashMap.java135 public class WeakHashMap<K,V>
136 extends AbstractMap<K,V>
137 implements Map<K,V> {
159 Entry<K,V>[] table;
193 private Entry<K,V>[] newTable(int n) { in newTable()
194 return (Entry<K,V>[]) new Entry<?,?>[n]; in newTable()
253 public WeakHashMap(Map<? extends K, ? extends V> m) { in WeakHashMap() argument
285 private boolean matchesKey(Entry<K,V> e, Object key) { in matchesKey() argument
326 Entry<K,V> e = (Entry<K,V>) x; in expungeStaleEntries()
329 Entry<K,V> prev = table[i]; in expungeStaleEntries()
[all …]
DHashMap.java138 public class HashMap<K,V> extends AbstractMap<K,V>
139 implements Map<K,V>, Cloneable, Serializable {
280 static class Node<K,V> implements Map.Entry<K,V> {
282 final K key;
284 Node<K,V> next;
286 Node(int hash, K key, V value, Node<K,V> next) { in Node() argument
293 public final K getKey() { return key; } in getKey()
389 transient Node<K,V>[] table;
395 transient Set<Map.Entry<K,V>> entrySet;
489 public HashMap(Map<? extends K, ? extends V> m) { in HashMap() argument
[all …]
/libcore/ojluni/annotations/flagged_api/java/util/concurrent/
DConcurrentSkipListMap.annotated.java40 …class ConcurrentSkipListMap<K, V> extends java.util.AbstractMap<K,V> implements java.util.concurre…
44 public ConcurrentSkipListMap(java.util.Comparator<? super K> comparator) { throw new RuntimeExcepti… in ConcurrentSkipListMap()
46 public ConcurrentSkipListMap(java.util.Map<? extends K,? extends V> m) { throw new RuntimeException… in ConcurrentSkipListMap() argument
48 public ConcurrentSkipListMap(java.util.SortedMap<K,? extends V> m) { throw new RuntimeException("St… in ConcurrentSkipListMap() argument
50 public java.util.concurrent.ConcurrentSkipListMap<K,V> clone() { throw new RuntimeException("Stub!"… in clone()
58 public V put(K key, V value) { throw new RuntimeException("Stub!"); } in put()
70 public V computeIfAbsent(K key, java.util.function.Function<? super K,? extends V> mappingFunction)… in computeIfAbsent() argument
72 public V computeIfPresent(K key, java.util.function.BiFunction<? super K,? super V,? extends V> rem… in computeIfPresent() argument
74 public V compute(K key, java.util.function.BiFunction<? super K,? super V,? extends V> remappingFun… in compute() argument
76 public V merge(K key, V value, java.util.function.BiFunction<? super V,? super V,? extends V> remap… in merge()
[all …]
/libcore/ojluni/src/main/java/java/util/concurrent/
DConcurrentSkipListMap.java112 public class ConcurrentSkipListMap<K,V> extends AbstractMap<K,V>
113 implements ConcurrentNavigableMap<K,V>, Cloneable, Serializable {
338 final Comparator<? super K> comparator;
341 private transient Index<K,V> head;
345 private transient KeySet<K,V> keySet;
347 private transient Values<K,V> values;
349 private transient EntrySet<K,V> entrySet;
351 private transient SubMap<K,V> descendingMap;
360 static final class Node<K,V> {
361 final K key; // currently, never detached
[all …]
DConcurrentNavigableMap.java54 public interface ConcurrentNavigableMap<K,V>
55 extends ConcurrentMap<K,V>, NavigableMap<K,V>
62 ConcurrentNavigableMap<K,V> subMap(K fromKey, boolean fromInclusive, in subMap()
63 K toKey, boolean toInclusive); in subMap()
70 ConcurrentNavigableMap<K,V> headMap(K toKey, boolean inclusive); in headMap()
77 ConcurrentNavigableMap<K,V> tailMap(K fromKey, boolean inclusive); in tailMap()
84 ConcurrentNavigableMap<K,V> subMap(K fromKey, K toKey); in subMap()
91 ConcurrentNavigableMap<K,V> headMap(K toKey); in headMap()
98 ConcurrentNavigableMap<K,V> tailMap(K fromKey); in tailMap()
112 ConcurrentNavigableMap<K,V> descendingMap(); in descendingMap()
[all …]
DConcurrentHashMap.java264 public class ConcurrentHashMap<K,V> extends AbstractMap<K,V>
265 implements ConcurrentMap<K,V>, Serializable {
625 static class Node<K,V> implements Map.Entry<K,V> {
627 final K key;
629 volatile Node<K,V> next;
631 Node(int hash, K key, V val) { in Node()
637 Node(int hash, K key, V val, Node<K,V> next) { in Node() argument
642 public final K getKey() { return key; } in getKey()
664 Node<K,V> find(int h, Object k) { in find()
665 Node<K,V> e = this; in find()
[all …]
/libcore/ojluni/annotations/hiddenapi/java/util/
DHashMap.java31 public class HashMap<K, V> extends java.util.AbstractMap<K, V>
32 implements java.util.Map<K, V>, java.lang.Cloneable, java.io.Serializable {
46 public HashMap(java.util.Map<? extends K, ? extends V> m) { in HashMap() argument
66 final void putMapEntries(java.util.Map<? extends K, ? extends V> m, boolean evict) { in putMapEntries() argument
82 final java.util.HashMap.Node<K, V> getNode(int hash, java.lang.Object key) { in getNode()
90 public V put(K key, V value) { in put()
94 final V putVal(int hash, K key, V value, boolean onlyIfAbsent, boolean evict) { in putVal()
98 final java.util.HashMap.Node<K, V>[] resize() { in resize()
102 final void treeifyBin(java.util.HashMap.Node<K, V>[] tab, int hash) { in treeifyBin() argument
106 public void putAll(java.util.Map<? extends K, ? extends V> m) { in putAll() argument
[all …]
DLinkedHashMap.java31 public class LinkedHashMap<K, V> extends java.util.HashMap<K, V> implements java.util.Map<K, V> {
45 public LinkedHashMap(java.util.Map<? extends K, ? extends V> m) { in LinkedHashMap() argument
53 private void linkNodeLast(java.util.LinkedHashMap.LinkedHashMapEntry<K, V> p) { in linkNodeLast() argument
58 java.util.LinkedHashMap.LinkedHashMapEntry<K, V> src, in transferLinks() argument
59 java.util.LinkedHashMap.LinkedHashMapEntry<K, V> dst) { in transferLinks()
67 java.util.HashMap.Node<K, V> newNode(int hash, K key, V value, java.util.HashMap.Node<K, V> e) { in newNode() argument
71 java.util.HashMap.Node<K, V> replacementNode( in replacementNode() argument
72 java.util.HashMap.Node<K, V> p, java.util.HashMap.Node<K, V> next) { in replacementNode()
76 java.util.HashMap.TreeNode<K, V> newTreeNode( in newTreeNode()
77 int hash, K key, V value, java.util.HashMap.Node<K, V> next) { in newTreeNode() argument
[all …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/
DRefSortedMap.java36 public class RefSortedMap<K, V> extends java.util.AbstractMap<K, V>
37 implements SortedMap<K, V>, Cloneable, Serializable {
41 private static final class MapEntry<K, V> implements Map.Entry<K, V> {
43 final K key;
46 MapEntry(K key, V value) { in MapEntry()
51 public K getKey() { in getKey()
85 transient ArrayList<MapEntry<K, V>> entries = new ArrayList<MapEntry<K, V>>();
88 private final Comparator<? super K> comparator;
90 class SubMap extends java.util.AbstractMap<K, V>
91 implements SortedMap<K, V>, Cloneable {
[all …]
/libcore/ojluni/annotations/sdk/nullability/java/util/
DMap.annotated.java32 public interface Map<K, V> {
44 @libcore.util.Nullable public V put(@libcore.util.NullFromTypeParam K key, @libcore.util.NullFromTy… in put()
48 public void putAll(@libcore.util.NonNull java.util.Map<? extends @libcore.util.NullFromTypeParam K,… in putAll() argument
52 @libcore.util.NonNull public java.util.Set<@libcore.util.NullFromTypeParam K> keySet(); in keySet()
56 …t<java.util.Map.@libcore.util.NonNull Entry<@libcore.util.NullFromTypeParam K, @libcore.util.NullF… in entrySet()
64 …nNull java.util.function.BiConsumer<? super @libcore.util.NullFromTypeParam K,? super @libcore.uti… in forEach() argument
66 …nNull java.util.function.BiFunction<? super @libcore.util.NullFromTypeParam K,? super @libcore.uti… in replaceAll() argument
68 @libcore.util.Nullable public default V putIfAbsent(@libcore.util.NullFromTypeParam K key, @libcore… in putIfAbsent()
72 public default boolean replace(@libcore.util.NullFromTypeParam K key, @libcore.util.Nullable V oldV… in replace()
74 @libcore.util.Nullable public default V replace(@libcore.util.NullFromTypeParam K key, @libcore.uti… in replace()
[all …]
DNavigableMap.annotated.java41 public interface NavigableMap<K, V> extends java.util.SortedMap<K,V> {
43 …ry<@libcore.util.NullFromTypeParam K, @libcore.util.NullFromTypeParam V> lowerEntry(@libcore.util.… in lowerEntry()
45 @libcore.util.Nullable public K lowerKey(@libcore.util.NullFromTypeParam K key); in lowerKey()
47 …ry<@libcore.util.NullFromTypeParam K, @libcore.util.NullFromTypeParam V> floorEntry(@libcore.util.… in floorEntry()
49 @libcore.util.Nullable public K floorKey(@libcore.util.NullFromTypeParam K key); in floorKey()
51 …y<@libcore.util.NullFromTypeParam K, @libcore.util.NullFromTypeParam V> ceilingEntry(@libcore.util… in ceilingEntry()
53 @libcore.util.Nullable public K ceilingKey(@libcore.util.NullFromTypeParam K key); in ceilingKey()
55 …ry<@libcore.util.NullFromTypeParam K, @libcore.util.NullFromTypeParam V> higherEntry(@libcore.util… in higherEntry()
57 @libcore.util.Nullable public K higherKey(@libcore.util.NullFromTypeParam K key); in higherKey()
59 @libcore.util.Nullable public java.util.Map.Entry<@libcore.util.NullFromTypeParam K, @libcore.util.… in firstEntry()
[all …]
DTreeMap.annotated.java32 public class TreeMap<K, V> extends java.util.AbstractMap<K,V> implements java.util.NavigableMap<K,V…
36 ….util.Nullable java.util.Comparator<? super @libcore.util.NullFromTypeParam K> comparator) { throw… in TreeMap()
38 public TreeMap(@libcore.util.NonNull java.util.Map<? extends @libcore.util.NullFromTypeParam K,? ex… in TreeMap() argument
40 public TreeMap(@libcore.util.NonNull java.util.SortedMap<@libcore.util.NullFromTypeParam K,? extend… in TreeMap() argument
50 @libcore.util.Nullable public java.util.Comparator<? super @libcore.util.NullFromTypeParam K> compa… in comparator()
52 @libcore.util.NullFromTypeParam public K firstKey() { throw new RuntimeException("Stub!"); } in firstKey()
54 @libcore.util.NullFromTypeParam public K lastKey() { throw new RuntimeException("Stub!"); } in lastKey()
56 public void putAll(@libcore.util.NonNull java.util.Map<? extends @libcore.util.NullFromTypeParam K,… in putAll() argument
58 @libcore.util.Nullable public V put(@libcore.util.NullFromTypeParam K key, @libcore.util.NullFromTy… in put()
66 @libcore.util.Nullable public java.util.Map.Entry<@libcore.util.NullFromTypeParam K, @libcore.util.… in firstEntry()
[all …]
/libcore/ojluni/src/main/java/sun/security/util/
DCache.java72 public abstract class Cache<K,V> {
91 public abstract void put(K key, V value); in put()
121 public abstract void accept(CacheVisitor<K,V> visitor); in accept() argument
127 public static <K,V> Cache<K,V> newSoftMemoryCache(int size) { in newSoftMemoryCache()
136 public static <K,V> Cache<K,V> newSoftMemoryCache(int size, int timeout) { in newSoftMemoryCache()
144 public static <K,V> Cache<K,V> newHardMemoryCache(int size) { in newHardMemoryCache()
152 public static <K,V> Cache<K,V> newNullCache() { in newNullCache()
153 return (Cache<K,V>) NullCache.INSTANCE; in newNullCache()
161 public static <K,V> Cache<K,V> newHardMemoryCache(int size, int timeout) { in newHardMemoryCache()
198 public interface CacheVisitor<K,V> {
[all …]
/libcore/ojluni/src/test/java/util/SequencedCollection/
DSimpleSortedMap.java32 public class SimpleSortedMap<K,V> implements SortedMap<K,V> {
33 final SortedMap<K,V> map;
39 public SimpleSortedMap(Comparator<? super K> comparator) { in SimpleSortedMap()
43 public SimpleSortedMap(Map<? extends K,? extends V> m) { in SimpleSortedMap() argument
75 public Set<Map.Entry<K,V>> entrySet() { in entrySet()
87 public Set<K> keySet() { in keySet()
91 public V put(K key, V value) { in put()
95 public void putAll(Map<? extends K,? extends V> m) { in putAll() argument
113 public Comparator<? super K> comparator() { in comparator()
117 public K firstKey() { in firstKey()
[all …]
/libcore/ojluni/annotations/hiddenapi/sun/security/util/
DMemoryCache.java22 class MemoryCache<K, V> extends sun.security.util.Cache<K, V> {
48 public synchronized void put(K key, V value) { in put()
68 public synchronized void accept(sun.security.util.Cache.CacheVisitor<K, V> visitor) { in accept() argument
72 private java.util.Map<K, V> getCachedEntries() { in getCachedEntries()
76 protected sun.security.util.MemoryCache.CacheEntry<K, V> newEntry( in newEntry()
77 K key, V value, long expirationTime, java.lang.ref.ReferenceQueue<V> queue) { in newEntry()
85 private final java.util.Map<K, sun.security.util.MemoryCache.CacheEntry<K, V>> cacheMap;
102 private static interface CacheEntry<K, V> {
108 public K getKey(); in getKey()
114 private static class HardCacheEntry<K, V>
[all …]

1234