/libcore/luni/src/main/java/java/util/ |
D | LinkedHashMap.java | 49 public class LinkedHashMap<K, V> extends HashMap<K, V> { 56 transient LinkedEntry<K, V> header; 131 public LinkedHashMap(Map<? extends K, ? extends V> map) { in LinkedHashMap() 137 header = new LinkedEntry<K, V>(); in init() 143 static class LinkedEntry<K, V> extends HashMapEntry<K, V> { 144 LinkedEntry<K, V> nxt; 145 LinkedEntry<K, V> prv; 154 LinkedEntry(K key, V value, int hash, HashMapEntry<K, V> next, in LinkedEntry() 155 LinkedEntry<K, V> nxt, LinkedEntry<K, V> prv) { in LinkedEntry() 166 public Entry<K, V> eldest() { in eldest() [all …]
|
D | NavigableMap.java | 66 public interface NavigableMap<K,V> extends SortedMap<K,V> { 80 Map.Entry<K,V> lowerEntry(K key); in lowerEntry() 109 Map.Entry<K,V> floorEntry(K key); in floorEntry() 138 Map.Entry<K,V> ceilingEntry(K key); in ceilingEntry() 167 Map.Entry<K,V> higherEntry(K key); in higherEntry() 187 Map.Entry<K,V> firstEntry(); in firstEntry() 193 Map.Entry<K,V> lastEntry(); in lastEntry() 202 Map.Entry<K,V> pollFirstEntry(); in pollFirstEntry() 211 Map.Entry<K,V> pollLastEntry(); in pollLastEntry() 228 NavigableMap<K,V> descendingMap(); in descendingMap() [all …]
|
D | HashMap.java | 53 public class HashMap<K, V> extends AbstractMap<K, V> implements Cloneable, Serializable { 90 transient HashMapEntry<K, V>[] table; 95 transient HashMapEntry<K, V> entryForNullKey; 118 private transient Set<Entry<K, V>> entrySet; 119 private transient Collection<V> values; 126 table = (HashMapEntry<K, V>[]) EMPTY_TABLE; in HashMap() 145 HashMapEntry<K, V>[] tab = (HashMapEntry<K, V>[]) EMPTY_TABLE; in HashMap() 194 public HashMap(Map<? extends K, ? extends V> map) { in HashMap() 204 final void constructorPutAll(Map<? extends K, ? extends V> map) { in constructorPutAll() 208 for (Entry<? extends K, ? extends V> e : map.entrySet()) { in constructorPutAll() [all …]
|
D | Map.java | 31 public interface Map<K,V> { 36 public static interface Entry<K,V> { 62 public V getValue(); in getValue() 81 public V setValue(V object); in setValue() 121 public Set<Map.Entry<K,V>> entrySet(); in entrySet() 144 public V get(Object key); in get() 193 public V put(K key, V value); in put() 211 public void putAll(Map<? extends K,? extends V> map); in putAll() 223 public V remove(Object key); in remove() 252 public Collection<V> values(); in values()
|
D | AbstractMap.java | 35 public abstract class AbstractMap<K, V> implements Map<K, V> { 40 Collection<V> valuesCollection; 48 public static class SimpleImmutableEntry<K, V> 49 implements Map.Entry<K, V>, Serializable { 53 private final V value; 55 public SimpleImmutableEntry(K theKey, V theValue) { in SimpleImmutableEntry() 63 public SimpleImmutableEntry(Map.Entry<? extends K, ? extends V> copyFrom) { in SimpleImmutableEntry() 72 public V getValue() { in getValue() 80 public V setValue(V object) { in setValue() 113 public static class SimpleEntry<K, V> [all …]
|
D | Hashtable.java | 37 public class Hashtable<K, V> extends Dictionary<K, V> 38 implements Map<K, V>, Cloneable, Serializable { 74 private transient HashtableEntry<K, V>[] table; 97 private transient Set<Entry<K, V>> entrySet; 98 private transient Collection<V> values; 106 table = (HashtableEntry<K, V>[]) EMPTY_TABLE; in Hashtable() 124 HashtableEntry<K, V>[] tab = (HashtableEntry<K, V>[]) EMPTY_TABLE; in Hashtable() 170 public Hashtable(Map<? extends K, ? extends V> map) { in Hashtable() 180 private void constructorPutAll(Map<? extends K, ? extends V> map) { in constructorPutAll() 184 for (Entry<? extends K, ? extends V> e : map.entrySet()) { in constructorPutAll() [all …]
|
D | WeakHashMap.java | 34 public class WeakHashMap<K, V> extends AbstractMap<K, V> implements Map<K, V> { 42 Entry<K, V>[] elementData; 52 private static <K, V> Entry<K, V>[] newEntryArray(int size) { in newEntryArray() 56 private static final class Entry<K, V> extends WeakReference<K> implements 57 Map.Entry<K, V> { 62 V value; 64 Entry<K, V> next; 66 interface Type<R, K, V> { 67 R get(Map.Entry<K, V> entry); in get() 70 Entry(K key, V object, ReferenceQueue<K> queue) { in Entry() [all …]
|
D | TreeMap.java | 66 public class TreeMap<K, V> extends AbstractMap<K, V> 67 implements SortedMap<K, V>, NavigableMap<K, V>, Cloneable, Serializable { 77 Node<K, V> root; 105 public TreeMap(Map<? extends K, ? extends V> copyFrom) { in TreeMap() 107 for (Map.Entry<? extends K, ? extends V> entry : copyFrom.entrySet()) { in TreeMap() 143 public TreeMap(SortedMap<K, ? extends V> copyFrom) { in TreeMap() 150 for (Map.Entry<K, ? extends V> entry : copyFrom.entrySet()) { in TreeMap() 158 TreeMap<K, V> map = (TreeMap<K, V>) super.clone(); in clone() 176 @Override public V get(Object key) { in get() 177 Entry<K, V> entry = findByObject(key); in get() [all …]
|
D | Dictionary.java | 30 public abstract class Dictionary<K, V> { 45 public abstract Enumeration<V> elements(); in elements() 56 public abstract V get(Object key); in get() 92 public abstract V put(K key, V value); in put() 105 public abstract V remove(Object key); in remove()
|
D | IdentityHashMap.java | 43 public class IdentityHashMap<K, V> extends AbstractMap<K, V> implements 44 Map<K, V>, Serializable, Cloneable { 85 static class IdentityHashMapEntry<K, V> extends MapEntry<K, V> { 86 private final IdentityHashMap<K,V> map; 88 IdentityHashMapEntry(IdentityHashMap<K,V> map, K theKey, V theValue) { in IdentityHashMapEntry() 122 public V setValue(V object) { in setValue() 123 V result = super.setValue(object); in setValue() 302 public IdentityHashMap(Map<? extends K, ? extends V> map) { 308 private V massageValue(Object value) { 309 return (V) ((value == NULL_OBJECT) ? null : value); [all …]
|
D | MapEntry.java | 23 class MapEntry<K, V> implements Map.Entry<K, V>, Cloneable { 26 V value; 36 MapEntry(K theKey, V theValue) { in MapEntry() 69 public V getValue() { in getValue() 79 public V setValue(V object) { in setValue() 80 V result = value; in setValue()
|
D | SortedMap.java | 25 public interface SortedMap<K,V> extends Map<K,V> { 62 public SortedMap<K,V> headMap(K endKey); in headMap() 97 public SortedMap<K,V> subMap(K startKey, K endKey); in subMap() 121 public SortedMap<K,V> tailMap(K startKey); in tailMap()
|
/libcore/luni/src/main/java/java/util/concurrent/ |
D | ExecutorCompletionService.java | 78 public class ExecutorCompletionService<V> implements CompletionService<V> { 81 private final BlockingQueue<Future<V>> completionQueue; 87 QueueingFuture(RunnableFuture<V> task) { in QueueingFuture() 92 private final Future<V> task; 95 private RunnableFuture<V> newTaskFor(Callable<V> task) { in newTaskFor() 97 return new FutureTask<V>(task); in newTaskFor() 102 private RunnableFuture<V> newTaskFor(Runnable task, V result) { in newTaskFor() 104 return new FutureTask<V>(task, result); in newTaskFor() 123 this.completionQueue = new LinkedBlockingQueue<Future<V>>(); in ExecutorCompletionService() 140 BlockingQueue<Future<V>> completionQueue) { in ExecutorCompletionService() [all …]
|
D | ConcurrentSkipListMap.java | 64 public class ConcurrentSkipListMap<K,V> extends AbstractMap<K,V> 65 implements ConcurrentNavigableMap<K,V>, 310 private transient volatile HeadIndex<K,V> head; 328 private transient EntrySet<K,V> entrySet; 330 private transient Values<V> values; 332 private transient ConcurrentNavigableMap<K,V> descendingMap; 345 head = new HeadIndex<K,V>(new Node<K,V>(null, BASE_HEADER, null), in initialize() 352 private boolean casHead(HeadIndex<K,V> cmp, HeadIndex<K,V> val) { in casHead() 365 static final class Node<K,V> { 368 volatile Node<K,V> next; [all …]
|
D | ConcurrentHashMap.java | 102 public class ConcurrentHashMap<K,V> extends java.util.AbstractMap<K,V> 103 implements ConcurrentMap<K,V>, Serializable { 424 static class Node<K,V> implements Map.Entry<K,V> { 427 volatile V val; 428 Node<K,V> next; 430 Node(int hash, K key, V val, Node<K,V> next) { in Node() 438 public final V getValue() { return val; } in getValue() 441 public final V setValue(V value) { in setValue() 457 Node<K,V> find(int h, Object k) { in find() 458 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 | 23 public interface ConcurrentNavigableMap<K,V> 24 extends ConcurrentMap<K,V>, NavigableMap<K,V> 31 ConcurrentNavigableMap<K,V> subMap(K fromKey, boolean fromInclusive, in subMap() 39 ConcurrentNavigableMap<K,V> headMap(K toKey, boolean inclusive); in headMap() 46 ConcurrentNavigableMap<K,V> tailMap(K fromKey, boolean inclusive); in tailMap() 53 ConcurrentNavigableMap<K,V> subMap(K fromKey, K toKey); in subMap() 60 ConcurrentNavigableMap<K,V> headMap(K toKey); in headMap() 67 ConcurrentNavigableMap<K,V> tailMap(K fromKey); in tailMap() 81 ConcurrentNavigableMap<K,V> descendingMap(); in descendingMap()
|
D | ConcurrentMap.java | 30 public interface ConcurrentMap<K,V> extends Map<K,V> { 59 V putIfAbsent(K key, V value); in putIfAbsent() 112 boolean replace(K key, V oldValue, V newValue); in replace() 141 V replace(K key, V value); in replace()
|
D | RecursiveTask.java | 39 public abstract class RecursiveTask<V> extends ForkJoinTask<V> { 45 V result; 50 protected abstract V compute(); in compute() 52 public final V getRawResult() { in getRawResult() 56 protected final void setRawResult(V value) { in setRawResult()
|
/libcore/luni/src/main/java/java/util/concurrent/atomic/ |
D | AtomicReference.java | 18 public class AtomicReference<V> implements java.io.Serializable { 31 private volatile V value; 38 public AtomicReference(V initialValue) { in AtomicReference() 53 public final V get() { in get() 62 public final void set(V newValue) { in set() 72 public final void lazySet(V newValue) { in lazySet() 84 public final boolean compareAndSet(V expect, V update) { in compareAndSet() 100 public final boolean weakCompareAndSet(V expect, V update) { in weakCompareAndSet() 110 public final V getAndSet(V newValue) { in getAndSet() 112 V x = get(); in getAndSet()
|
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 …]
|
D | AtomicReferenceFieldUpdater.java | 49 public abstract class AtomicReferenceFieldUpdater<T,V> { 90 public abstract boolean compareAndSet(T obj, V expect, V update); in compareAndSet() 108 public abstract boolean weakCompareAndSet(T obj, V expect, V update); in weakCompareAndSet() 118 public abstract void set(T obj, V newValue); in set() 128 public abstract void lazySet(T obj, V newValue); in lazySet() 137 public abstract V get(T obj); in get() 147 public V getAndSet(T obj, V newValue) { in getAndSet() 149 V current = get(obj); in getAndSet() 155 private static final class AtomicReferenceFieldUpdaterImpl<T,V> 156 extends AtomicReferenceFieldUpdater<T,V> { [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 synchronized final V get(K key) { in get() 49 V result = map.get(key); in get() 70 public synchronized final V put(K key, V value) { in put() 77 V previous = map.put(key, value); in put() 84 Map.Entry<K, V> toEvict = map.eldest(); in trimToSize() 87 V value = toEvict.getValue(); in trimToSize() 98 protected void entryEvicted(K key, V value) {} in entryEvicted() [all …]
|