/libcore/ojluni/src/main/java/java/util/ |
D | Map.java | 130 public interface Map<K, V> { 214 V get(Object key); in get() 242 V put(K key, V value); in put() 274 V remove(Object key); in remove() 298 void putAll(Map<? extends K, ? extends V> m); in putAll() 344 Collection<V> values(); in values() 362 Set<Map.Entry<K, V>> entrySet(); in entrySet() 377 interface Entry<K, V> { 398 V getValue(); in getValue() 420 V setValue(V value); in setValue() [all …]
|
D | AbstractMap.java | 68 public abstract class AbstractMap<K,V> implements Map<K,V> { 109 Iterator<Entry<K,V>> i = entrySet().iterator(); in containsValue() 112 Entry<K,V> e = i.next(); in containsValue() 118 Entry<K,V> e = i.next(); in containsValue() 140 Iterator<Map.Entry<K,V>> i = entrySet().iterator(); in containsKey() 143 Entry<K,V> e = i.next(); in containsKey() 149 Entry<K,V> e = i.next(); in containsKey() 170 public V get(Object key) { in get() 171 Iterator<Entry<K,V>> i = entrySet().iterator(); in get() 174 Entry<K,V> e = i.next(); in get() [all …]
|
D | NavigableMap.java | 96 public interface NavigableMap<K,V> extends SortedMap<K,V> { 110 Map.Entry<K,V> lowerEntry(K key); in lowerEntry() 139 Map.Entry<K,V> floorEntry(K key); in floorEntry() 168 Map.Entry<K,V> ceilingEntry(K key); in ceilingEntry() 197 Map.Entry<K,V> higherEntry(K key); in higherEntry() 220 Map.Entry<K,V> firstEntry(); in firstEntry() 229 Map.Entry<K,V> lastEntry(); in lastEntry() 238 Map.Entry<K,V> pollFirstEntry(); in pollFirstEntry() 247 Map.Entry<K,V> pollLastEntry(); in pollLastEntry() 264 NavigableMap<K,V> descendingMap(); in descendingMap() [all …]
|
D | LinkedHashMap.java | 166 public class LinkedHashMap<K,V> 167 extends HashMap<K,V> 168 implements Map<K,V> 176 private transient LinkedHashMapEntry<K,V> header; 230 public LinkedHashMap(Map<? extends K, ? extends V> m) { in LinkedHashMap() 272 for (LinkedHashMapEntry<K,V> e = header.after; e != header; e = e.after) { in transfer() 317 public V get(Object key) { in get() 318 LinkedHashMapEntry<K,V> e = (LinkedHashMapEntry<K,V>)getEntry(key); in get() 337 private static class LinkedHashMapEntry<K,V> extends HashMapEntry<K,V> { 339 LinkedHashMapEntry<K,V> before, after; [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 = null; 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 | 135 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() 303 Entry<K,V> e = (Entry<K,V>) x; in expungeStaleEntries() 306 Entry<K,V> prev = table[i]; in expungeStaleEntries() 307 Entry<K,V> p = prev; in expungeStaleEntries() [all …]
|
D | Hashtable.java | 130 public class Hashtable<K,V> 131 extends Dictionary<K,V> 132 implements Map<K,V>, Cloneable, java.io.Serializable { 137 private transient HashtableEntry<K,V>[] table; 227 public Hashtable(Map<? extends K, ? extends V> t) { in Hashtable() 275 public synchronized Enumeration<V> elements() { in elements() 276 return this.<V>getEnumeration(VALUES); in elements() 302 for (HashtableEntry<K,V> e = tab[i] ; e != null ; e = e.next) { in contains() 341 for (HashtableEntry<K,V> e = tab[index] ; e != null ; e = e.next) { in containsKey() 364 public synchronized V get(Object key) { in get() [all …]
|
D | HashMap.java | 129 public class HashMap<K,V> 130 extends AbstractMap<K,V> 131 implements Map<K,V>, Cloneable, Serializable 159 transient HashMapEntry<K,V>[] table = (HashMapEntry<K,V>[]) EMPTY_TABLE; 252 public HashMap(Map<? extends K, ? extends V> m) { in HashMap() 345 public V get(Object key) { in get() 348 Entry<K,V> entry = getEntry(key); in get() 360 private V getForNullKey() { in getForNullKey() 364 for (HashMapEntry<K,V> e = table[0]; e != null; e = e.next) { in getForNullKey() 388 final Entry<K,V> getEntry(Object key) { in getEntry() [all …]
|
D | Collections.java | 1416 public static <K,V> Map<K,V> unmodifiableMap(Map<? extends K, ? extends V> m) { 1423 private static class UnmodifiableMap<K,V> implements Map<K,V>, Serializable { 1426 private final Map<? extends K, ? extends V> m; 1428 UnmodifiableMap(Map<? extends K, ? extends V> m) { 1438 public V get(Object key) {return m.get(key);} 1440 public V put(K key, V value) { 1443 public V remove(Object key) { 1446 public void putAll(Map<? extends K, ? extends V> m) { 1454 private transient Set<Map.Entry<K,V>> entrySet = null; 1455 private transient Collection<V> values = null; [all …]
|
/libcore/luni/src/main/java/java/util/concurrent/ |
D | ExecutorCompletionService.java | 77 public class ExecutorCompletionService<V> implements CompletionService<V> { 80 private final BlockingQueue<Future<V>> completionQueue; 85 private static class QueueingFuture<V> extends FutureTask<Void> { 86 QueueingFuture(RunnableFuture<V> task, in QueueingFuture() 87 BlockingQueue<Future<V>> completionQueue) { in QueueingFuture() 92 private final Future<V> task; 93 private final BlockingQueue<Future<V>> completionQueue; 97 private RunnableFuture<V> newTaskFor(Callable<V> task) { in newTaskFor() 99 return new FutureTask<V>(task); in newTaskFor() 104 private RunnableFuture<V> newTaskFor(Runnable task, V result) { in newTaskFor() [all …]
|
D | ConcurrentMap.java | 44 public interface ConcurrentMap<K,V> extends Map<K,V> { 59 default V getOrDefault(Object key, V defaultValue) { in getOrDefault() 60 V v; in getOrDefault() 83 default void forEach(BiConsumer<? super K, ? super V> action) { in forEach() 85 for (Map.Entry<K,V> entry : entrySet()) { in forEach() 87 V v; in forEach() 130 V putIfAbsent(K key, V value); in putIfAbsent() 193 boolean replace(K key, V oldValue, V newValue); in replace() 225 V replace(K key, V value); in replace() 258 default void replaceAll(BiFunction<? super K, ? super V, ? extends V> function) { in replaceAll() argument [all …]
|
D | ConcurrentSkipListMap.java | 86 public class ConcurrentSkipListMap<K,V> extends AbstractMap<K,V> 87 implements ConcurrentNavigableMap<K,V>, Cloneable, Serializable { 338 private transient volatile HeadIndex<K,V> head; 349 private transient KeySet<K,V> keySet; 351 private transient EntrySet<K,V> entrySet; 353 private transient Values<K,V> values; 355 private transient ConcurrentNavigableMap<K,V> descendingMap; 367 head = new HeadIndex<K,V>(new Node<K,V>(null, BASE_HEADER, null), in initialize() 374 private boolean casHead(HeadIndex<K,V> cmp, HeadIndex<K,V> val) { in casHead() 387 static final class Node<K,V> { [all …]
|
D | ConcurrentHashMap.java | 235 public class ConcurrentHashMap<K,V> extends AbstractMap<K,V> 236 implements ConcurrentMap<K,V>, Serializable { 596 static class Node<K,V> implements Map.Entry<K,V> { 599 volatile V val; 600 volatile Node<K,V> next; 602 Node(int hash, K key, V val, Node<K,V> next) { in Node() 610 public final V getValue() { return val; } in getValue() 615 public final V setValue(V value) { in setValue() 631 Node<K,V> find(int h, Object k) { in find() 632 Node<K,V> e = this; in find() [all …]
|
D | CompletionService.java | 32 public interface CompletionService<V> { 44 Future<V> submit(Callable<V> task); in submit() 60 Future<V> submit(Runnable task, V result); in submit() 69 Future<V> take() throws InterruptedException; in take() 78 Future<V> poll(); in poll() 94 Future<V> poll(long timeout, TimeUnit unit) throws InterruptedException; in poll()
|
D | ConcurrentNavigableMap.java | 25 public interface ConcurrentNavigableMap<K,V> 26 extends ConcurrentMap<K,V>, NavigableMap<K,V> 33 ConcurrentNavigableMap<K,V> subMap(K fromKey, boolean fromInclusive, in subMap() 41 ConcurrentNavigableMap<K,V> headMap(K toKey, boolean inclusive); in headMap() 48 ConcurrentNavigableMap<K,V> tailMap(K fromKey, boolean inclusive); in tailMap() 55 ConcurrentNavigableMap<K,V> subMap(K fromKey, K toKey); in subMap() 62 ConcurrentNavigableMap<K,V> headMap(K toKey); in headMap() 69 ConcurrentNavigableMap<K,V> tailMap(K fromKey); in tailMap() 83 ConcurrentNavigableMap<K,V> descendingMap(); in descendingMap()
|
D | RecursiveTask.java | 39 public abstract class RecursiveTask<V> extends ForkJoinTask<V> { 45 V result; 51 protected abstract V compute(); in compute() 53 public final V getRawResult() { in getRawResult() 57 protected final void setRawResult(V value) { in setRawResult()
|
/libcore/luni/src/main/java/java/util/concurrent/atomic/ |
D | AtomicReference.java | 20 public class AtomicReference<V> implements java.io.Serializable { 35 private volatile V value; 42 public AtomicReference(V initialValue) { in AtomicReference() 57 public final V get() { in get() 66 public final void set(V newValue) { in set() 76 public final void lazySet(V newValue) { in lazySet() 88 public final boolean compareAndSet(V expect, V update) { in compareAndSet() 104 public final boolean weakCompareAndSet(V expect, V update) { in weakCompareAndSet() 115 public final V getAndSet(V newValue) { in getAndSet() 116 return (V)U.getAndSetObject(this, VALUE, newValue); in getAndSet() [all …]
|
D | AtomicReferenceFieldUpdater.java | 56 public abstract class AtomicReferenceFieldUpdater<T,V> { 102 public abstract boolean compareAndSet(T obj, V expect, V update); in compareAndSet() 120 public abstract boolean weakCompareAndSet(T obj, V expect, V update); in weakCompareAndSet() 130 public abstract void set(T obj, V newValue); in set() 140 public abstract void lazySet(T obj, V newValue); in lazySet() 149 public abstract V get(T obj); in get() 159 public V getAndSet(T obj, V newValue) { in getAndSet() 160 V prev; in getAndSet() 178 public final V getAndUpdate(T obj, UnaryOperator<V> updateFunction) { in getAndUpdate() 179 V prev, next; in getAndUpdate() [all …]
|
D | AtomicStampedReference.java | 21 public class AtomicStampedReference<V> { 35 private volatile Pair<V> pair; 44 public AtomicStampedReference(V initialRef, int initialStamp) { in AtomicStampedReference() 53 public V getReference() { in getReference() 74 public V get(int[] stampHolder) { in get() 75 Pair<V> pair = this.pair; in get() 96 public boolean weakCompareAndSet(V expectedReference, in weakCompareAndSet() 97 V newReference, in weakCompareAndSet() 116 public boolean compareAndSet(V expectedReference, in compareAndSet() 117 V newReference, in compareAndSet() [all …]
|
D | AtomicMarkableReference.java | 21 public class AtomicMarkableReference<V> { 35 private volatile Pair<V> pair; 44 public AtomicMarkableReference(V initialRef, boolean initialMark) { in AtomicMarkableReference() 53 public V getReference() { in getReference() 74 public V get(boolean[] markHolder) { in get() 75 Pair<V> pair = this.pair; in get() 96 public boolean weakCompareAndSet(V expectedReference, in weakCompareAndSet() 97 V newReference, in weakCompareAndSet() 116 public boolean compareAndSet(V expectedReference, in compareAndSet() 117 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()
|
/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() 61 V newVal = createObject(key); in get() 67 CacheEntry<K, V> newEntry = new CacheEntry<>(key, newVal, queue); in get() 83 protected V put(K key, V value) { in put() 84 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/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 …]
|