/libcore/ojluni/src/main/java/java/util/ |
D | Map.java | 128 public interface Map<K, V> { 212 V get(Object key); in get() 240 V put(K key, V value); in put() 272 V remove(Object key); in remove() 296 void putAll(Map<? extends K, ? extends V> m); in putAll() 342 Collection<V> values(); in values() 360 Set<Map.Entry<K, V>> entrySet(); in entrySet() 375 interface Entry<K, V> { 396 V getValue(); in getValue() 418 V setValue(V value); in setValue() [all …]
|
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() 228 transient LinkedHashMapEntry<K,V> head; 233 transient LinkedHashMapEntry<K,V> tail; 246 private void linkNodeLast(LinkedHashMapEntry<K,V> p) { in linkNodeLast() 247 LinkedHashMapEntry<K,V> last = tail; in linkNodeLast() [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() 175 public V get(Object key) { in get() 176 Iterator<Entry<K,V>> i = entrySet().iterator(); in get() 179 Entry<K,V> e = i.next(); in get() [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> { 281 V value; 282 Node<K,V> next; 284 Node(int hash, K key, V value, Node<K,V> next) { in Node() 292 public final V getValue() { return value; } in getValue() 299 public final V setValue(V newValue) { in setValue() 300 V oldValue = value; in setValue() 395 transient Node<K,V>[] table; [all …]
|
D | TreeMap.java | 112 public class TreeMap<K,V> 113 extends AbstractMap<K,V> 114 implements NavigableMap<K,V>, Cloneable, java.io.Serializable 124 private transient TreeMapEntry<K,V> root; 184 public TreeMap(Map<? extends K, ? extends V> m) { in TreeMap() 198 public TreeMap(SortedMap<K, ? extends V> m) { in TreeMap() 250 for (TreeMapEntry<K,V> e = getFirstEntry(); e != null; e = successor(e)) in containsValue() 278 public V get(Object key) { in get() 279 TreeMapEntry<K,V> p = getEntry(key); in get() 313 public void putAll(Map<? extends K, ? extends V> map) { in putAll() [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() 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 | NavigableMap.java | 97 public interface NavigableMap<K,V> extends SortedMap<K,V> { 111 Map.Entry<K,V> lowerEntry(K key); in lowerEntry() 140 Map.Entry<K,V> floorEntry(K key); in floorEntry() 169 Map.Entry<K,V> ceilingEntry(K key); in ceilingEntry() 198 Map.Entry<K,V> higherEntry(K key); in higherEntry() 221 Map.Entry<K,V> firstEntry(); in firstEntry() 230 Map.Entry<K,V> lastEntry(); in lastEntry() 239 Map.Entry<K,V> pollFirstEntry(); in pollFirstEntry() 248 Map.Entry<K,V> pollLastEntry(); in pollLastEntry() 265 NavigableMap<K,V> descendingMap(); in descendingMap() [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() 273 public synchronized Enumeration<V> elements() { in elements() 274 return this.<V>getEnumeration(VALUES); in elements() 363 public synchronized V get(Object key) { in get() 369 return (V)e.value; in get() 410 for (HashtableEntry<K,V> old = (HashtableEntry<K,V>)oldMap[i] ; old != null ; ) { in rehash() 411 HashtableEntry<K,V> e = old; in rehash() [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) { 1496 public V get(Object key) {return m.get(key);} 1498 public V put(K key, V value) { 1501 public V remove(Object key) { 1504 public void putAll(Map<? extends K, ? extends V> m) { 1512 private transient Set<Map.Entry<K,V>> entrySet; 1513 private transient Collection<V> values; [all …]
|
/libcore/ojluni/src/main/java/java/util/concurrent/ |
D | ExecutorCompletionService.java | 106 public class ExecutorCompletionService<V> implements CompletionService<V> { 109 private final BlockingQueue<Future<V>> completionQueue; 114 private static class QueueingFuture<V> extends FutureTask<Void> { 115 QueueingFuture(RunnableFuture<V> task, in QueueingFuture() 116 BlockingQueue<Future<V>> completionQueue) { in QueueingFuture() 121 private final Future<V> task; 122 private final BlockingQueue<Future<V>> completionQueue; 126 private RunnableFuture<V> newTaskFor(Callable<V> task) { in newTaskFor() 128 return new FutureTask<V>(task); in newTaskFor() 133 private RunnableFuture<V> newTaskFor(Runnable task, V result) { in newTaskFor() [all …]
|
D | ConcurrentMap.java | 73 public interface ConcurrentMap<K,V> extends Map<K,V> { 88 default V getOrDefault(Object key, V defaultValue) { in getOrDefault() 89 V v; in getOrDefault() 112 default void forEach(BiConsumer<? super K, ? super V> action) { in forEach() 114 for (Map.Entry<K,V> entry : entrySet()) { in forEach() 116 V v; 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 [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; 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() 416 static final class Node<K,V> { [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> { 628 volatile V val; 629 volatile Node<K,V> next; 631 Node(int hash, K key, V val, Node<K,V> next) { in Node() 639 public final V getValue() { return val; } in getValue() 644 public final V setValue(V value) { in setValue() 660 Node<K,V> find(int h, Object k) { in find() 661 Node<K,V> e = this; in find() [all …]
|
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() 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()
|
/libcore/ojluni/src/main/java/java/util/concurrent/atomic/ |
D | AtomicReference.java | 49 public class AtomicReference<V> implements java.io.Serializable { 64 private volatile V value; 71 public AtomicReference(V initialValue) { in AtomicReference() 86 public final V get() { in get() 95 public final void set(V newValue) { in set() 105 public final void lazySet(V newValue) { in lazySet() 117 public final boolean compareAndSet(V expect, V update) { in compareAndSet() 133 public final boolean weakCompareAndSet(V expect, V update) { in weakCompareAndSet() 144 public final V getAndSet(V newValue) { in getAndSet() 145 return (V)U.getAndSetObject(this, VALUE, newValue); in getAndSet() [all …]
|
D | AtomicReferenceFieldUpdater.java | 85 public abstract class AtomicReferenceFieldUpdater<T,V> { 131 public abstract boolean compareAndSet(T obj, V expect, V update); in compareAndSet() 149 public abstract boolean weakCompareAndSet(T obj, V expect, V update); in weakCompareAndSet() 159 public abstract void set(T obj, V newValue); in set() 169 public abstract void lazySet(T obj, V newValue); in lazySet() 178 public abstract V get(T obj); in get() 188 public V getAndSet(T obj, V newValue) { in getAndSet() 189 V prev; in getAndSet() 207 public final V getAndUpdate(T obj, UnaryOperator<V> updateFunction) { in getAndUpdate() 208 V prev, next; in getAndUpdate() [all …]
|
D | AtomicStampedReference.java | 50 public class AtomicStampedReference<V> { 64 private volatile Pair<V> pair; 73 public AtomicStampedReference(V initialRef, int initialStamp) { in AtomicStampedReference() 82 public V getReference() { in getReference() 103 public V get(int[] stampHolder) { in get() 104 Pair<V> pair = this.pair; in get() 125 public boolean weakCompareAndSet(V expectedReference, in weakCompareAndSet() 126 V newReference, in weakCompareAndSet() 145 public boolean compareAndSet(V expectedReference, in compareAndSet() 146 V newReference, in compareAndSet() [all …]
|
D | AtomicMarkableReference.java | 50 public class AtomicMarkableReference<V> { 64 private volatile Pair<V> pair; 73 public AtomicMarkableReference(V initialRef, boolean initialMark) { in AtomicMarkableReference() 82 public V getReference() { in getReference() 103 public V get(boolean[] markHolder) { in get() 104 Pair<V> pair = this.pair; in get() 125 public boolean weakCompareAndSet(V expectedReference, in weakCompareAndSet() 126 V newReference, in weakCompareAndSet() 145 public boolean compareAndSet(V expectedReference, in compareAndSet() 146 V newReference, in compareAndSet() [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() 96 public abstract V get(Object key); in get() 116 public abstract void accept(CacheVisitor<K,V> visitor); in accept() 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() [all …]
|
/libcore/ojluni/src/main/java/sun/nio/ch/ |
D | CompletedFuture.java | 38 final class CompletedFuture<V> implements Future<V> { 39 private final V result; 42 private CompletedFuture(V result, Throwable exc) { in CompletedFuture() 47 static <V> CompletedFuture<V> withResult(V result) { in withResult() 48 return new CompletedFuture<V>(result, null); in withResult() 51 static <V> CompletedFuture<V> withFailure(Throwable exc) { in withFailure() 55 return new CompletedFuture<V>(null, exc); in withFailure() 58 static <V> CompletedFuture<V> withResult(V result, Throwable exc) { in withResult() 67 public V get() throws ExecutionException { in get() 74 public V get(long timeout, TimeUnit unit) throws ExecutionException { in get()
|
D | Invoker.java | 120 static <V,A> void invokeUnchecked(CompletionHandler<V,? super A> handler, in invokeUnchecked() argument 122 V value, in invokeUnchecked() 153 static <V,A> void invokeDirect(GroupAndInvokeCount myGroupAndInvokeCount, in invokeDirect() 154 CompletionHandler<V,? super A> handler, in invokeDirect() argument 156 V result, in invokeDirect() 168 static <V,A> void invoke(AsynchronousChannel channel, in invoke() 169 CompletionHandler<V,? super A> handler, in invoke() argument 171 V result, in invoke() 208 static <V,A> void invokeIndirectly(AsynchronousChannel channel, in invokeIndirectly() 209 final CompletionHandler<V,? super A> handler, in invokeIndirectly() argument [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; 41 private ReferenceQueue<V> queue = new ReferenceQueue<>(); 51 public V get(K key) { in get() 52 V value = null; in get() 55 CacheEntry<K, V> entry = map.get(key); in get() 60 V newVal = createObject(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() [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> { 44 V value; 46 MapEntry(K key, V value) { in MapEntry() 55 public V getValue() { in getValue() 59 public V setValue(V v) { in setValue() 60 V res = value; in setValue() 85 transient ArrayList<MapEntry<K, V>> entries = new ArrayList<MapEntry<K, V>>(); 90 class SubMap extends java.util.AbstractMap<K, V> [all …]
|
/libcore/ojluni/src/main/java/java/lang/reflect/ |
D | WeakCache.java | 57 final class WeakCache<K, P, V> { 62 private final ConcurrentMap<Object, ConcurrentMap<Object, Supplier<V>>> map 64 private final ConcurrentMap<Supplier<V>, Boolean> reverseMap 67 private final BiFunction<K, P, V> valueFactory; 80 BiFunction<K, P, V> valueFactory) { in WeakCache() 100 public V get(K key, P parameter) { in get() 108 ConcurrentMap<Object, Supplier<V>> valuesMap = map.get(cacheKey); in get() 110 ConcurrentMap<Object, Supplier<V>> oldValuesMap in get() 121 Supplier<V> supplier = valuesMap.get(subKey); in get() 127 V value = supplier.get(); in get() [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() 49 V result; in get() 82 public synchronized final V put(K key, V value) { in put() 89 V previous = map.put(key, value); in put() 96 Map.Entry<K, V> toEvict = map.eldest(); in trimToSize() 99 V value = toEvict.getValue(); in trimToSize() 110 protected void entryEvicted(K key, V value) {} in entryEvicted() [all …]
|