/libcore/ojluni/src/main/java/java/util/ |
D | Map.java | 156 public interface Map<K, V> { 268 V put(K key, V value); in put() 324 void putAll(Map<? extends K, ? extends V> m); in putAll() argument 353 Set<K> keySet(); in keySet() 388 Set<Map.Entry<K, V>> entrySet(); in entrySet() 403 interface Entry<K, V> { 412 K getKey(); in getKey() 498 … public static <K extends Comparable<? super K>, V> Comparator<Map.Entry<K, V>> comparingByKey() { in comparingByKey() 499 return (Comparator<Map.Entry<K, V>> & Serializable) in comparingByKey() 515 …public static <K, V extends Comparable<? super V>> Comparator<Map.Entry<K, V>> comparingByValue() { in comparingByValue() [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 | Collections.java | 1479 public static <K,V> Map<K,V> unmodifiableMap(Map<? extends K, ? extends V> m) { 1486 private static class UnmodifiableMap<K,V> implements Map<K,V>, Serializable { 1489 private final Map<? extends K, ? extends V> m; 1491 UnmodifiableMap(Map<? extends K, ? extends V> m) { 1503 public V put(K key, V value) { 1509 public void putAll(Map<? extends K, ? extends V> m) { 1516 private transient Set<K> keySet; 1517 private transient Set<Map.Entry<K,V>> entrySet; 1520 public Set<K> keySet() { 1526 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 …]
|
/libcore/ojluni/src/main/java/java/util/concurrent/ |
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 …]
|
/libcore/ojluni/annotations/hiddenapi/java/util/ |
D | HashMap.java | 31 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() argument 66 final void putMapEntries(java.util.Map<? extends K, ? extends V> m, boolean evict) { in putMapEntries() argument 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() argument 106 public void putAll(java.util.Map<? extends K, ? extends V> m) { in putAll() argument [all …]
|
D | LinkedHashMap.java | 31 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() argument 53 private void linkNodeLast(java.util.LinkedHashMap.LinkedHashMapEntry<K, V> p) { in linkNodeLast() argument 58 java.util.LinkedHashMap.LinkedHashMapEntry<K, V> src, in transferLinks() argument 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() argument 71 java.util.HashMap.Node<K, V> replacementNode( in replacementNode() argument 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() argument [all …]
|
D | EnumMap.java | 32 public class EnumMap<K extends java.lang.Enum<K>, V> extends java.util.AbstractMap<K, V> 35 public EnumMap(java.lang.Class<K> keyType) { in EnumMap() 39 public EnumMap(java.util.EnumMap<K, ? extends V> m) { in EnumMap() argument 43 public EnumMap(java.util.Map<K, ? extends V> m) { in EnumMap() argument 75 public V put(K key, V value) { in put() 91 public void putAll(java.util.Map<? extends K, ? extends V> m) { in putAll() argument 99 public java.util.Set<K> keySet() { in keySet() 107 public java.util.Set<java.util.Map.Entry<K, V>> entrySet() { in entrySet() 127 public java.util.EnumMap<K, V> clone() { in clone() 131 private void typeCheck(K key) { in typeCheck() [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/annotations/sdk/nullability/java/util/ |
D | NavigableMap.annotated.java | 41 public interface NavigableMap<K, V> extends java.util.SortedMap<K,V> { 43 …ry<@libcore.util.NullFromTypeParam K, @libcore.util.NullFromTypeParam V> lowerEntry(@libcore.util.… in lowerEntry() 45 @libcore.util.Nullable public K lowerKey(@libcore.util.NullFromTypeParam K key); in lowerKey() 47 …ry<@libcore.util.NullFromTypeParam K, @libcore.util.NullFromTypeParam V> floorEntry(@libcore.util.… in floorEntry() 49 @libcore.util.Nullable public K floorKey(@libcore.util.NullFromTypeParam K key); in floorKey() 51 …y<@libcore.util.NullFromTypeParam K, @libcore.util.NullFromTypeParam V> ceilingEntry(@libcore.util… in ceilingEntry() 53 @libcore.util.Nullable public K ceilingKey(@libcore.util.NullFromTypeParam K key); in ceilingKey() 55 …ry<@libcore.util.NullFromTypeParam K, @libcore.util.NullFromTypeParam V> higherEntry(@libcore.util… in higherEntry() 57 @libcore.util.Nullable public K higherKey(@libcore.util.NullFromTypeParam K key); in higherKey() 59 @libcore.util.Nullable public java.util.Map.Entry<@libcore.util.NullFromTypeParam K, @libcore.util.… in firstEntry() [all …]
|
D | Map.annotated.java | 32 public interface Map<K, V> { 44 @libcore.util.Nullable public V put(@libcore.util.NullFromTypeParam K key, @libcore.util.NullFromTy… in put() 48 public void putAll(@libcore.util.NonNull java.util.Map<? extends @libcore.util.NullFromTypeParam K,… in putAll() argument 52 @libcore.util.NonNull public java.util.Set<@libcore.util.NullFromTypeParam K> keySet(); in keySet() 56 …t<java.util.Map.@libcore.util.NonNull Entry<@libcore.util.NullFromTypeParam K, @libcore.util.NullF… in entrySet() 64 …nNull java.util.function.BiConsumer<? super @libcore.util.NullFromTypeParam K,? super @libcore.uti… in forEach() argument 66 …nNull java.util.function.BiFunction<? super @libcore.util.NullFromTypeParam K,? super @libcore.uti… in replaceAll() argument 68 @libcore.util.Nullable public default V putIfAbsent(@libcore.util.NullFromTypeParam K key, @libcore… in putIfAbsent() 72 public default boolean replace(@libcore.util.NullFromTypeParam K key, @libcore.util.Nullable V oldV… in replace() 74 @libcore.util.Nullable public default V replace(@libcore.util.NullFromTypeParam K key, @libcore.uti… in replace() [all …]
|
D | TreeMap.annotated.java | 32 public class TreeMap<K, V> extends java.util.AbstractMap<K,V> implements java.util.NavigableMap<K,V… 36 ….util.Nullable java.util.Comparator<? super @libcore.util.NullFromTypeParam K> comparator) { throw… in TreeMap() 38 public TreeMap(@libcore.util.NonNull java.util.Map<? extends @libcore.util.NullFromTypeParam K,? ex… in TreeMap() argument 40 public TreeMap(@libcore.util.NonNull java.util.SortedMap<@libcore.util.NullFromTypeParam K,? extend… in TreeMap() argument 50 @libcore.util.Nullable public java.util.Comparator<? super @libcore.util.NullFromTypeParam K> compa… in comparator() 52 @libcore.util.NullFromTypeParam public K firstKey() { throw new RuntimeException("Stub!"); } in firstKey() 54 @libcore.util.NullFromTypeParam public K lastKey() { throw new RuntimeException("Stub!"); } in lastKey() 56 public void putAll(@libcore.util.NonNull java.util.Map<? extends @libcore.util.NullFromTypeParam K,… in putAll() argument 58 @libcore.util.Nullable public V put(@libcore.util.NullFromTypeParam K key, @libcore.util.NullFromTy… in put() 66 @libcore.util.Nullable public java.util.Map.Entry<@libcore.util.NullFromTypeParam K, @libcore.util.… in firstEntry() [all …]
|
D | SortedMap.annotated.java | 31 public interface SortedMap<K, V> extends java.util.Map<K,V> { 33 @libcore.util.Nullable public java.util.Comparator<? super @libcore.util.NullFromTypeParam K> compa… in comparator() 35 …llFromTypeParam K, @libcore.util.NullFromTypeParam V> subMap(@libcore.util.NullFromTypeParam K fro… in subMap() 37 …dMap<@libcore.util.NullFromTypeParam K, @libcore.util.NullFromTypeParam V> headMap(@libcore.util.N… in headMap() 39 …dMap<@libcore.util.NullFromTypeParam K, @libcore.util.NullFromTypeParam V> tailMap(@libcore.util.N… in tailMap() 41 @libcore.util.NullFromTypeParam public K firstKey(); in firstKey() 43 @libcore.util.NullFromTypeParam public K lastKey(); in lastKey() 45 @libcore.util.NonNull public java.util.Set<@libcore.util.NullFromTypeParam K> keySet(); in keySet() 49 …t<java.util.Map.@libcore.util.NonNull Entry<@libcore.util.NullFromTypeParam K, @libcore.util.NullF… in entrySet()
|
D | HashMap.annotated.java | 31 public class HashMap<K, V> extends java.util.AbstractMap<K,V> implements java.util.Map<K,V>, java.l… 39 public HashMap(@libcore.util.NonNull java.util.Map<? extends @libcore.util.NullFromTypeParam K, ? e… in HashMap() argument 49 @libcore.util.Nullable public V put(@libcore.util.NullFromTypeParam K key, @libcore.util.NullFromTy… in put() 51 public void putAll(@libcore.util.NonNull java.util.Map<? extends @libcore.util.NullFromTypeParam K,… in putAll() argument 59 @libcore.util.NonNull public java.util.Set<@libcore.util.NullFromTypeParam K> keySet() { throw new … in keySet() 63 …t<java.util.Map.@libcore.util.NonNull Entry<@libcore.util.NullFromTypeParam K, @libcore.util.NullF… in entrySet() 67 @libcore.util.Nullable public V putIfAbsent(@libcore.util.NullFromTypeParam K key, @libcore.util.Nu… in putIfAbsent() 71 public boolean replace(@libcore.util.NullFromTypeParam K key, @libcore.util.Nullable V oldValue, @l… in replace() 73 @libcore.util.Nullable public V replace(@libcore.util.NullFromTypeParam K key, @libcore.util.NullFr… in replace() 75 …ore.util.NullFromTypeParam K key, @libcore.util.NonNull java.util.function.Function<? super @libco… in computeIfAbsent() argument [all …]
|
D | AbstractMap.annotated.java | 32 public abstract class AbstractMap<K, V> implements java.util.Map<K,V> { 46 @libcore.util.Nullable public V put(@libcore.util.NullFromTypeParam K key, @libcore.util.NullFromTy… in put() 50 public void putAll(@libcore.util.NonNull java.util.Map<? extends @libcore.util.NullFromTypeParam K,… in putAll() argument 54 @libcore.util.NonNull public java.util.Set<@libcore.util.NullFromTypeParam K> keySet() { throw new … in keySet() 58 …t<java.util.Map.@libcore.util.NonNull Entry<@libcore.util.NullFromTypeParam K, @libcore.util.NullF… in entrySet() 69 public static class SimpleEntry<K, V> implements java.util.Map.Entry<K,V>, java.io.Serializable { 71 public SimpleEntry(@libcore.util.NullFromTypeParam K key, @libcore.util.NullFromTypeParam V value) … in SimpleEntry() 73 ….util.NonNull java.util.Map.Entry<? extends @libcore.util.NullFromTypeParam K, ? extends @libcore.… in SimpleEntry() argument 75 @libcore.util.NullFromTypeParam public K getKey() { throw new RuntimeException("Stub!"); } in getKey() 89 public static class SimpleImmutableEntry<K, V> implements java.util.Map.Entry<K,V>, java.io.Seriali… [all …]
|
/libcore/ojluni/annotations/hiddenapi/sun/security/util/ |
D | MemoryCache.java | 22 class MemoryCache<K, V> extends sun.security.util.Cache<K, V> { 48 public synchronized void put(K key, V value) { in put() 68 public synchronized void accept(sun.security.util.Cache.CacheVisitor<K, V> visitor) { in accept() argument 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; 102 private static interface CacheEntry<K, V> { 108 public K getKey(); in getKey() 114 private static class HardCacheEntry<K, V> [all …]
|
D | Cache.java | 32 public abstract class Cache<K, V> { 45 public abstract void put(K key, V value); in put() 56 public abstract void accept(sun.security.util.Cache.CacheVisitor<K, V> visitor); in accept() argument 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> { 82 public void visit(java.util.Map<K, V> map); in visit() argument
|
/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 | 28 public class BasicLruCache<K, V> { 30 private final LinkedHashMap<K, V> map; 39 this.map = new LinkedHashMap<K, V>(0, 0.75f, true); in BasicLruCache() 49 public final V get(K key) { in get() 88 public synchronized final V put(K key, V value) { in put() 102 Map.Entry<K, V> toEvict = map.eldest(); in trimToSize() 104 K key = toEvict.getKey(); in trimToSize() 116 protected void entryEvicted(K key, V value) {} in entryEvicted() 123 protected V create(K key) { in create() 131 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 …]
|
/libcore/ojluni/annotations/mmodule/java/util/ |
D | LinkedHashMap.annotated.java | 31 public class LinkedHashMap<K, V> extends java.util.HashMap<K,V> implements java.util.Map<K,V> { 39 public LinkedHashMap(java.util.Map<? extends K, ? extends V> m) { throw new RuntimeException("Stub!… in LinkedHashMap() argument 53 public java.util.Map.Entry<K,V> eldest() { throw new RuntimeException("Stub!"); } in eldest() 55 protected boolean removeEldestEntry(java.util.Map.Entry<K,V> eldest) { throw new RuntimeException("… in removeEldestEntry() argument 57 public java.util.Set<K> keySet() { throw new RuntimeException("Stub!"); } in keySet() 61 public java.util.Set<java.util.Map.Entry<K,V>> entrySet() { throw new RuntimeException("Stub!"); } in entrySet() 63 public void forEach(java.util.function.BiConsumer<? super K,? super V> action) { throw new RuntimeE… in forEach() argument 65 public void replaceAll(java.util.function.BiFunction<? super K,? super V,? extends V> function) { t… in replaceAll() argument
|
/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 …]
|