/libcore/ojluni/src/main/java/java/util/ |
D | HashSet.java | 131 public HashSet(int initialCapacity, float loadFactor) { in HashSet() argument 132 map = new HashMap<>(initialCapacity, loadFactor); in HashSet() 160 HashSet(int initialCapacity, float loadFactor, boolean dummy) { in HashSet() argument 161 map = new LinkedHashMap<>(initialCapacity, loadFactor); in HashSet() 280 s.writeFloat(map.loadFactor()); in writeObject() 307 float loadFactor = s.readFloat(); in readObject() local 308 if (loadFactor <= 0 || Float.isNaN(loadFactor)) { in readObject() 310 loadFactor); in readObject() 322 capacity = (int) Math.min(size * Math.min(1 / loadFactor, 4.0f), in readObject() 327 new LinkedHashMap<E,Object>(capacity, loadFactor) : in readObject() [all …]
|
D | LinkedHashSet.java | 133 public LinkedHashSet(int initialCapacity, float loadFactor) { in LinkedHashSet() argument 134 super(initialCapacity, loadFactor, true); in LinkedHashSet()
|
D | Hashtable.java | 157 private float loadFactor; field in Hashtable 180 public Hashtable(int initialCapacity, float loadFactor) { in Hashtable() argument 184 if (loadFactor <= 0 || Float.isNaN(loadFactor)) in Hashtable() 185 throw new IllegalArgumentException("Illegal Load: "+loadFactor); in Hashtable() 189 this.loadFactor = loadFactor; in Hashtable() 406 threshold = (int)Math.min(newCapacity * loadFactor, MAX_ARRAY_SIZE + 1); in rehash() 847 if (count == 0 || loadFactor < 0) in hashCode() 850 loadFactor = -loadFactor; // Mark hashCode computation in progress in hashCode() 859 loadFactor = -loadFactor; // Mark hashCode computation complete in hashCode() 1174 if (loadFactor <= 0 || Float.isNaN(loadFactor)) in readObject() [all …]
|
D | WeakHashMap.java | 175 private final float loadFactor; field in WeakHashMap 207 public WeakHashMap(int initialCapacity, float loadFactor) { in WeakHashMap() argument 214 if (loadFactor <= 0 || Float.isNaN(loadFactor)) in WeakHashMap() 216 loadFactor); in WeakHashMap() 221 this.loadFactor = loadFactor; in WeakHashMap() 222 threshold = (int)(capacity * loadFactor); in WeakHashMap() 502 threshold = (int)(newCapacity * loadFactor); in resize() 555 int targetCapacity = (int)(numKeysToBeAdded / loadFactor + 1); in putAll()
|
D | HashMap.java | 433 final float loadFactor; field in HashMap 446 public HashMap(int initialCapacity, float loadFactor) { in HashMap() argument 452 if (loadFactor <= 0 || Float.isNaN(loadFactor)) in HashMap() 454 loadFactor); in HashMap() 455 this.loadFactor = loadFactor; in HashMap() 475 this.loadFactor = DEFAULT_LOAD_FACTOR; // all other fields defaulted in HashMap() 488 this.loadFactor = DEFAULT_LOAD_FACTOR; in HashMap() 503 float ft = ((float)s / loadFactor) + 1.0F; in putMapEntries() 697 float ft = (float)newCap * loadFactor; in resize() 1341 final float loadFactor() { return loadFactor; } in loadFactor() method in HashMap [all …]
|
D | LinkedHashMap.java | 370 public LinkedHashMap(int initialCapacity, float loadFactor) { in LinkedHashMap() argument 371 super(initialCapacity, loadFactor); in LinkedHashMap() 423 float loadFactor, in LinkedHashMap() argument 425 super(initialCapacity, loadFactor); in LinkedHashMap()
|
/libcore/luni/src/test/java/libcore/java/util/ |
D | HashtableTest.java | 140 final float loadFactor = 0.75f; in test_deserializedArrayLength() local 143 Hashtable<Integer, Integer> hashtable1 = new Hashtable<>(1, loadFactor); in test_deserializedArrayLength() 162 assertTrue(table2.length >= (entriesCount / loadFactor)); in test_deserializedArrayLength()
|
/libcore/ojluni/src/main/java/sun/util/locale/ |
D | LocaleObjectCache.java | 47 public LocaleObjectCache(int initialCapacity, float loadFactor, int concurrencyLevel) { in LocaleObjectCache() argument 48 map = new ConcurrentHashMap<>(initialCapacity, loadFactor, concurrencyLevel); in LocaleObjectCache()
|
/libcore/ojluni/src/main/java/java/io/ |
D | ObjectOutputStream.java | 2334 private final float loadFactor; field in ObjectOutputStream.HandleTable 2345 HandleTable(int initialCapacity, float loadFactor) { in HandleTable() argument 2346 this.loadFactor = loadFactor; in HandleTable() 2350 threshold = (int) (initialCapacity * loadFactor); in HandleTable() 2419 threshold = (int) (spine.length * loadFactor); in growSpine() 2462 ReplaceTable(int initialCapacity, float loadFactor) { in ReplaceTable() argument 2463 htab = new HandleTable(initialCapacity, loadFactor); in ReplaceTable()
|
/libcore/ojluni/src/main/java/java/util/concurrent/ |
D | ConcurrentHashMap.java | 878 public ConcurrentHashMap(int initialCapacity, float loadFactor) { in ConcurrentHashMap() argument 879 this(initialCapacity, loadFactor, 1); in ConcurrentHashMap() 901 float loadFactor, int concurrencyLevel) { in ConcurrentHashMap() argument 902 if (!(loadFactor > 0.0f) || initialCapacity < 0 || concurrencyLevel <= 0) in ConcurrentHashMap() 906 long size = (long)(1.0 + (long)initialCapacity / loadFactor); in ConcurrentHashMap() 1388 final float loadFactor; field in ConcurrentHashMap.Segment 1389 Segment(float lf) { this.loadFactor = lf; } in Segment()
|