/libcore/ojluni/src/main/java/java/util/ |
D | NavigableMap.java | 97 public interface NavigableMap<K,V> extends SortedMap<K,V> { 111 Map.Entry<K,V> lowerEntry(K key); in lowerEntry() 125 K lowerKey(K key); in lowerKey() 140 Map.Entry<K,V> floorEntry(K key); in floorEntry() 154 K floorKey(K key); in floorKey() 169 Map.Entry<K,V> ceilingEntry(K key); in ceilingEntry() 183 K ceilingKey(K key); in ceilingKey() 198 Map.Entry<K,V> higherEntry(K key); in higherEntry() 212 K higherKey(K key); in higherKey() 221 Map.Entry<K,V> firstEntry(); in firstEntry() [all …]
|
D | TreeMap.java | 112 public class TreeMap<K,V> 113 extends AbstractMap<K,V> 114 implements NavigableMap<K,V>, Cloneable, java.io.Serializable 122 private final Comparator<? super K> comparator; 124 private transient TreeMapEntry<K,V> root; 166 public TreeMap(Comparator<? super K> comparator) { in TreeMap() 184 public TreeMap(Map<? extends K, ? extends V> m) { in TreeMap() argument 198 public TreeMap(SortedMap<K, ? extends V> m) { in TreeMap() argument 250 for (TreeMapEntry<K,V> e = getFirstEntry(); e != null; e = successor(e)) in containsValue() 279 TreeMapEntry<K,V> p = getEntry(key); in get() [all …]
|
D | SortedMap.java | 113 public interface SortedMap<K,V> extends 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()
|
D | LinkedHashMap.java | 181 public class LinkedHashMap<K,V> 182 extends HashMap<K,V> 183 implements Map<K,V> 216 static class LinkedHashMapEntry<K,V> extends HashMap.Node<K,V> { 217 LinkedHashMapEntry<K,V> before, after; 218 LinkedHashMapEntry(int hash, K key, V value, Node<K,V> next) { in LinkedHashMapEntry() argument 228 transient LinkedHashMapEntry<K,V> head; 233 transient LinkedHashMapEntry<K,V> tail; 246 private void linkNodeLast(LinkedHashMapEntry<K,V> p) { in linkNodeLast() argument 247 LinkedHashMapEntry<K,V> last = tail; in linkNodeLast() [all …]
|
D | WeakHashMap.java | 136 public class WeakHashMap<K,V> 137 extends AbstractMap<K,V> 138 implements Map<K,V> { 160 Entry<K,V>[] table; 194 private Entry<K,V>[] newTable(int n) { in newTable() 195 return (Entry<K,V>[]) new Entry<?,?>[n]; in newTable() 254 public WeakHashMap(Map<? extends K, ? extends V> m) { in WeakHashMap() argument 321 Entry<K,V> e = (Entry<K,V>) x; in expungeStaleEntries() 324 Entry<K,V> prev = table[i]; in expungeStaleEntries() 325 Entry<K,V> p = prev; in expungeStaleEntries() [all …]
|
D | HashMap.java | 137 public class HashMap<K,V> extends AbstractMap<K,V> 138 implements Map<K,V>, Cloneable, Serializable { 278 static class Node<K,V> implements Map.Entry<K,V> { 280 final K key; 282 Node<K,V> next; 284 Node(int hash, K key, V value, Node<K,V> next) { in Node() argument 291 public final K getKey() { return key; } in getKey() 395 transient Node<K,V>[] table; 401 transient Set<Map.Entry<K,V>> entrySet; 487 public HashMap(Map<? extends K, ? extends V> m) { in HashMap() argument [all …]
|
D | AbstractMap.java | 68 public abstract class AbstractMap<K,V> implements Map<K,V> { 112 Iterator<Entry<K,V>> i = entrySet().iterator(); in containsValue() 115 Entry<K,V> e = i.next(); in containsValue() 121 Entry<K,V> e = i.next(); in containsValue() 144 Iterator<Map.Entry<K,V>> i = entrySet().iterator(); in containsKey() 147 Entry<K,V> e = i.next(); in containsKey() 153 Entry<K,V> e = i.next(); in containsKey() 176 Iterator<Entry<K,V>> i = entrySet().iterator(); in get() 179 Entry<K,V> e = i.next(); in get() 185 Entry<K,V> e = i.next(); in get() [all …]
|
D | Map.java | 128 public interface Map<K, V> { 240 V put(K key, V value); in put() 296 void putAll(Map<? extends K, ? extends V> m); in putAll() argument 325 Set<K> keySet(); in keySet() 360 Set<Map.Entry<K, V>> entrySet(); in entrySet() 375 interface Entry<K, V> { 384 K getKey(); in getKey() 470 … public static <K extends Comparable<? super K>, V> Comparator<Map.Entry<K, V>> comparingByKey() { in comparingByKey() 471 return (Comparator<Map.Entry<K, V>> & Serializable) in comparingByKey() 487 …public static <K, V extends Comparable<? super V>> Comparator<Map.Entry<K, V>> comparingByValue() { in comparingByValue() [all …]
|
D | Collections.java | 1474 public static <K,V> Map<K,V> unmodifiableMap(Map<? extends K, ? extends V> m) { 1481 private static class UnmodifiableMap<K,V> implements Map<K,V>, Serializable { 1484 private final Map<? extends K, ? extends V> m; 1486 UnmodifiableMap(Map<? extends K, ? extends V> m) { 1498 public V put(K key, V value) { 1504 public void putAll(Map<? extends K, ? extends V> m) { 1511 private transient Set<K> keySet; 1512 private transient Set<Map.Entry<K,V>> entrySet; 1515 public Set<K> keySet() { 1521 public Set<Map.Entry<K,V>> entrySet() { [all …]
|
D | Hashtable.java | 130 public class Hashtable<K,V> 131 extends Dictionary<K,V> 132 implements Map<K,V>, Cloneable, java.io.Serializable { 225 public Hashtable(Map<? extends K, ? extends V> t) { in Hashtable() argument 258 public synchronized Enumeration<K> keys() { in keys() 259 return this.<K>getEnumeration(KEYS); in keys() 410 for (HashtableEntry<K,V> old = (HashtableEntry<K,V>)oldMap[i] ; old != null ; ) { in rehash() 411 HashtableEntry<K,V> e = old; in rehash() 415 e.next = (HashtableEntry<K,V>)newMap[index]; in rehash() 421 private void addEntry(int hash, K key, V value, int index) { in addEntry() [all …]
|
D | EnumMap.java | 79 public class EnumMap<K extends Enum<K>, V> extends AbstractMap<K, V> 87 private final Class<K> keyType; 92 private transient K[] keyUniverse; 136 public EnumMap(Class<K> keyType) { in EnumMap() 149 public EnumMap(EnumMap<K, ? extends V> m) { in EnumMap() argument 168 public EnumMap(Map<K, ? extends V> m) { in EnumMap() argument 170 EnumMap<K, ? extends V> em = (EnumMap<K, ? extends V>) m; in EnumMap() 266 public V put(K key, V value) { in put() 333 public void putAll(Map<? extends K, ? extends V> m) { in putAll() argument 370 private transient Set<Map.Entry<K,V>> entrySet; [all …]
|
D | IdentityHashMap.java | 138 public class IdentityHashMap<K,V> 139 extends AbstractMap<K,V> 140 implements Map<K,V>, java.io.Serializable, Cloneable 264 public IdentityHashMap(Map<? extends K, ? extends V> m) { in IdentityHashMap() argument 419 public V put(K key, V value) { in put() 498 public void putAll(Map<? extends K, ? extends V> m) { in putAll() argument 505 for (Entry<? extends K, ? extends V> e : m.entrySet()) in putAll() 822 private class KeyIterator extends IdentityHashMapIterator<K> { 824 public K next() { in next() 825 return (K) unmaskNull(traversalTable[nextIndex()]); in next() [all …]
|
/libcore/ojluni/src/main/java/java/util/concurrent/ |
D | ConcurrentNavigableMap.java | 54 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 …]
|
D | ConcurrentSkipListMap.java | 115 public class ConcurrentSkipListMap<K,V> extends AbstractMap<K,V> 116 implements ConcurrentNavigableMap<K,V>, Cloneable, Serializable { 367 private transient volatile HeadIndex<K,V> head; 375 final Comparator<? super K> comparator; 378 private transient KeySet<K,V> keySet; 380 private transient EntrySet<K,V> entrySet; 382 private transient Values<K,V> values; 384 private transient ConcurrentNavigableMap<K,V> descendingMap; 396 head = new HeadIndex<K,V>(new Node<K,V>(null, BASE_HEADER, null), in initialize() 403 private boolean casHead(HeadIndex<K,V> cmp, HeadIndex<K,V> val) { in casHead() argument [all …]
|
D | ConcurrentHashMap.java | 264 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, Node<K,V> next) { in Node() argument 638 public final K getKey() { return key; } in getKey() 660 Node<K,V> find(int h, Object k) { in find() 661 Node<K,V> e = this; in find() 664 K ek; in find() [all …]
|
D | ConcurrentMap.java | 73 public interface ConcurrentMap<K,V> extends Map<K,V> { 112 default void forEach(BiConsumer<? super K, ? super V> action) { in forEach() argument 114 for (Map.Entry<K,V> entry : entrySet()) { in forEach() 115 K k; in forEach() 159 V putIfAbsent(K key, V value); in putIfAbsent() 222 boolean replace(K key, V oldValue, V newValue); in replace() 254 V replace(K key, V value); in replace() 287 default void replaceAll(BiFunction<? super K, ? super V, ? extends V> function) { in replaceAll() argument 327 default V computeIfAbsent(K key, in computeIfAbsent() 328 Function<? super K, ? extends V> mappingFunction) { in computeIfAbsent() argument [all …]
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/ |
D | RefSortedMap.java | 36 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/src/main/java/sun/security/util/ |
D | Cache.java | 72 public abstract class Cache<K,V> { 91 public abstract void put(K key, V value); in put() 116 public abstract void accept(CacheVisitor<K,V> visitor); in accept() argument 122 public static <K,V> Cache<K,V> newSoftMemoryCache(int size) { in newSoftMemoryCache() 131 public static <K,V> Cache<K,V> newSoftMemoryCache(int size, int timeout) { in newSoftMemoryCache() 139 public static <K,V> Cache<K,V> newHardMemoryCache(int size) { in newHardMemoryCache() 147 public static <K,V> Cache<K,V> newNullCache() { in newNullCache() 148 return (Cache<K,V>) NullCache.INSTANCE; in newNullCache() 156 public static <K,V> Cache<K,V> newHardMemoryCache(int size, int timeout) { in newHardMemoryCache() 197 public interface CacheVisitor<K,V> { [all …]
|
/libcore/ojluni/src/main/java/sun/util/locale/ |
D | LocaleObjectCache.java | 39 public abstract class LocaleObjectCache<K, V> { 40 private ConcurrentMap<K, CacheEntry<K, V>> map; 51 public V get(K key) { in get() 55 CacheEntry<K, V> entry = map.get(key); in get() 69 CacheEntry<K, V> newEntry = new CacheEntry<>(key, newVal, queue); in get() 85 protected V put(K key, V value) { in put() 86 CacheEntry<K, V> entry = new CacheEntry<>(key, value, queue); in put() 87 CacheEntry<K, V> oldEntry = map.put(key, entry); in put() 93 CacheEntry<K, V> entry; in cleanStaleEntries() 94 while ((entry = (CacheEntry<K, V>)queue.poll()) != null) { in cleanStaleEntries() [all …]
|
/libcore/luni/src/main/java/libcore/util/ |
D | BasicLruCache.java | 26 public class BasicLruCache<K, V> { 27 private final LinkedHashMap<K, V> map; 35 this.map = new LinkedHashMap<K, V>(0, 0.75f, true); in BasicLruCache() 44 public final V get(K key) { in get() 82 public synchronized final V put(K key, V value) { in put() 96 Map.Entry<K, V> toEvict = map.eldest(); in trimToSize() 98 K key = toEvict.getKey(); in trimToSize() 110 protected void entryEvicted(K key, V value) {} in entryEvicted() 117 protected V create(K key) { in create() 125 public synchronized final Map<K, V> snapshot() { in snapshot() [all …]
|
/libcore/ojluni/src/main/java/java/util/stream/ |
D | AbstractTask.java | 88 K extends AbstractTask<P_IN, P_OUT, R, K>> 116 protected K leftChild; 123 protected K rightChild; 151 protected AbstractTask(K parent, in AbstractTask() 168 protected abstract K makeChild(Spliterator<P_IN> spliterator); in makeChild() 273 protected K getParent() { in getParent() 274 return (K) getCompleter(); in getParent() 296 @SuppressWarnings("unchecked") K task = (K) this; in compute() 298 K leftChild, rightChild, taskToFork; in compute() 343 K node = (K) this; in isLeftmostNode() [all …]
|
D | AbstractShortCircuitTask.java | 44 K extends AbstractShortCircuitTask<P_IN, P_OUT, R, K>> 45 extends AbstractTask<P_IN, P_OUT, R, K> { 81 protected AbstractShortCircuitTask(K parent, in AbstractShortCircuitTask() 106 @SuppressWarnings("unchecked") K task = (K) this; in compute() 118 K leftChild, rightChild, taskToFork; in compute() 209 for (K parent = getParent(); !cancel && parent != null; parent = parent.getParent()) in taskCanceled() 223 for (@SuppressWarnings("unchecked") K parent = getParent(), node = (K) this; in cancelLaterNodes() 228 K rightSibling = parent.rightChild; in cancelLaterNodes()
|
D | Collectors.java | 316 private static <K, V, M extends Map<K,V>> 319 for (Map.Entry<K,V> e : m2.entrySet()) 803 public static <T, K> Collector<T, ?, Map<K, List<T>>> 804 groupingBy(Function<? super T, ? extends K> classifier) { 850 public static <T, K, A, D> 851 Collector<T, ?, Map<K, D>> groupingBy(Function<? super T, ? extends K> classifier, 900 public static <T, K, D, A, M extends Map<K, D>> 901 Collector<T, ?, M> groupingBy(Function<? super T, ? extends K> classifier, 906 BiConsumer<Map<K, A>, T> accumulator = (m, t) -> { 907 … K key = Objects.requireNonNull(classifier.apply(t), "element cannot be mapped to a null key"); [all …]
|
/libcore/ojluni/src/main/java/java/lang/reflect/ |
D | WeakCache.java | 57 final class WeakCache<K, P, V> { 59 private final ReferenceQueue<K> refQueue 66 private final BiFunction<K, P, ?> subKeyFactory; 67 private final BiFunction<K, P, V> valueFactory; 79 public WeakCache(BiFunction<K, P, ?> subKeyFactory, in WeakCache() argument 80 BiFunction<K, P, V> valueFactory) { in WeakCache() 100 public V get(K key, P parameter) { in get() 188 CacheKey<K> cacheKey; in expungeStaleEntries() 189 while ((cacheKey = (CacheKey<K>)refQueue.poll()) != null) { in expungeStaleEntries() 200 private final K key; [all …]
|
/libcore/luni/src/test/java/libcore/java/util/ |
D | CollectionsTest.java | 342 public void test_checkedNavigableMap_replace$K$V() { in test_checkedNavigableMap_replace$K$V() 345 MapDefaultMethodTester.test_replace$K$V$V(map, in test_checkedNavigableMap_replace$K$V() 349 public void test_checkedNavigableMap_replace$K$V$V() { in test_checkedNavigableMap_replace$K$V$V() 352 MapDefaultMethodTester.test_replace$K$V$V(map, in test_checkedNavigableMap_replace$K$V$V() 531 public void test_unmodifiableMap_replace$K$V$V() { in test_unmodifiableMap_replace$K$V$V() 548 public void test_unmodifiableMap_replace$K$V() { in test_unmodifiableMap_replace$K$V() 703 public void test_synchronizedNavigableMap_replace$K$V$V() { in test_synchronizedNavigableMap_replace$K$V$V() 704 MapDefaultMethodTester.test_replace$K$V$V( in test_synchronizedNavigableMap_replace$K$V$V() 709 public void test_synchronizedNavigableMap_replace$K$V() { in test_synchronizedNavigableMap_replace$K$V() 710 MapDefaultMethodTester.test_replace$K$V( in test_synchronizedNavigableMap_replace$K$V() [all …]
|