Home
last modified time | relevance | path

Searched refs:V (Results 1 – 25 of 112) sorted by relevance

12345

/libcore/ojluni/src/main/java/java/util/
DMap.java128 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 …]
DLinkedHashMap.java181 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 …]
DAbstractMap.java68 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 …]
DHashMap.java137 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 …]
DTreeMap.java112 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 …]
DWeakHashMap.java136 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 …]
DNavigableMap.java97 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 …]
DHashtable.java130 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 …]
/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()
66 final void putMapEntries(java.util.Map<? extends K, ? extends V> m, boolean evict) { in putMapEntries()
78 public V get(java.lang.Object key) { in get()
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()
[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()
53 private void linkNodeLast(java.util.LinkedHashMap.LinkedHashMapEntry<K, V> p) { in linkNodeLast()
58 java.util.LinkedHashMap.LinkedHashMapEntry<K, V> src, in transferLinks()
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()
71 java.util.HashMap.Node<K, V> replacementNode( in replacementNode()
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()
[all …]
/libcore/ojluni/src/main/java/java/util/concurrent/
DExecutorCompletionService.java106 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 …]
DConcurrentMap.java73 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 …]
DConcurrentSkipListMap.java115 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 …]
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> {
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 …]
/libcore/ojluni/src/main/java/java/util/concurrent/atomic/
DAtomicReference.java49 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 …]
DAtomicReferenceFieldUpdater.java84 public abstract class AtomicReferenceFieldUpdater<T,V> {
130 public abstract boolean compareAndSet(T obj, V expect, V update); in compareAndSet()
148 public abstract boolean weakCompareAndSet(T obj, V expect, V update); in weakCompareAndSet()
158 public abstract void set(T obj, V newValue); in set()
168 public abstract void lazySet(T obj, V newValue); in lazySet()
177 public abstract V get(T obj); in get()
187 public V getAndSet(T obj, V newValue) { in getAndSet()
188 V prev; in getAndSet()
206 public final V getAndUpdate(T obj, UnaryOperator<V> updateFunction) { in getAndUpdate()
207 V prev, next; in getAndUpdate()
[all …]
DAtomicStampedReference.java50 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 …]
/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()
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/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()
52 public synchronized V get(java.lang.Object key) { in get()
68 public synchronized void accept(sun.security.util.Cache.CacheVisitor<K, V> visitor) { in accept()
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;
95 private final java.lang.ref.ReferenceQueue<V> queue;
102 private static interface CacheEntry<K, V> {
[all …]
DCache.java32 public abstract class Cache<K, V> {
45 public abstract void put(K key, V value); in put()
48 public abstract V get(java.lang.Object key); in get()
56 public abstract void accept(sun.security.util.Cache.CacheVisitor<K, V> visitor); in accept()
58 public static <K, V> sun.security.util.Cache<K, V> newSoftMemoryCache(int size) { in newSoftMemoryCache()
62 public static <K, V> sun.security.util.Cache<K, V> newSoftMemoryCache(int size, int timeout) { in newSoftMemoryCache()
67 public static <K, V> sun.security.util.Cache<K, V> newHardMemoryCache(int size) { in newHardMemoryCache()
71 public static <K, V> sun.security.util.Cache<K, V> newNullCache() { in newNullCache()
75 public static <K, V> sun.security.util.Cache<K, V> newHardMemoryCache(int size, int timeout) { in newHardMemoryCache()
80 public static interface CacheVisitor<K, V> {
[all …]
/libcore/ojluni/annotations/sdk/nullability/java/util/
DMap.annotated.java32 public interface Map<K, V> {
42 @libcore.util.Nullable public V get(@libcore.util.Nullable java.lang.Object key); in get()
44 @libcore.util.Nullable public V put(@libcore.util.NullFromTypeParam K key, @libcore.util.NullFromTy… in put()
46 @libcore.util.Nullable public V remove(@libcore.util.Nullable java.lang.Object key); in remove()
48 …il.Map<? extends @libcore.util.NullFromTypeParam K,? extends @libcore.util.NullFromTypeParam V> m); in putAll()
54 @libcore.util.NonNull public java.util.Collection<@libcore.util.NullFromTypeParam V> values(); in values()
56 …il.NonNull Entry<@libcore.util.NullFromTypeParam K, @libcore.util.NullFromTypeParam V>> entrySet(); in entrySet()
62 …core.util.Nullable public default V getOrDefault(@libcore.util.Nullable java.lang.Object key, @lib… in getOrDefault()
64 …r @libcore.util.NullFromTypeParam K,? super @libcore.util.NullFromTypeParam V> action) { throw new… in forEach()
66 …omTypeParam K,? super @libcore.util.NullFromTypeParam V,? extends @libcore.util.NullFromTypeParam in replaceAll() argument
[all …]
DHashMap.annotated.java31 public class HashMap<K, V> extends java.util.AbstractMap<K,V> implements java.util.Map<K,V>, java.l…
39 …libcore.util.NullFromTypeParam K, ? extends @libcore.util.NullFromTypeParam V> m) { throw new Runt… in HashMap()
45 @libcore.util.Nullable public V get(@libcore.util.Nullable java.lang.Object key) { throw new Runtim… in get()
49 @libcore.util.Nullable public V put(@libcore.util.NullFromTypeParam K key, @libcore.util.NullFromTy… in put()
51 …@libcore.util.NullFromTypeParam K,? extends @libcore.util.NullFromTypeParam V> m) { throw new Runt… in putAll()
53 @libcore.util.Nullable public V remove(@libcore.util.Nullable java.lang.Object key) { throw new Run… in remove()
61 @libcore.util.NonNull public java.util.Collection<@libcore.util.NullFromTypeParam V> values() { thr… in values()
63 …ll Entry<@libcore.util.NullFromTypeParam K, @libcore.util.NullFromTypeParam V>> entrySet() { throw… in entrySet()
65 @libcore.util.Nullable public V getOrDefault(@libcore.util.Nullable java.lang.Object key, @libcore.… in getOrDefault()
67 @libcore.util.Nullable public V putIfAbsent(@libcore.util.NullFromTypeParam K key, @libcore.util.Nu… in putIfAbsent()
[all …]
/libcore/ojluni/src/main/java/sun/nio/ch/
DCompletedFuture.java38 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/
DLocaleObjectCache.java39 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/
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> {
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 …]

12345