Searched defs:newCapacity (Results 1 - 5 of 5) sorted by relevance

/libcore/luni/src/main/java/java/util/
H A DArrayList.java154 Object[] newArray = new Object[newCapacity(s)];
173 private static int newCapacity(int currentCapacity) { method in class:ArrayList
197 int newCapacity = newCapacity(newSize - 1); // ~33% growth room
198 Object[] newArray = new Object[newCapacity];
238 int newCapacity = newCapacity(newSize - 1); // ~33% growth room
239 Object[] newArray = new Object[newCapacity];
H A DVector.java445 private void grow(int newCapacity) { argument
446 E[] newData = newElementArray(newCapacity);
447 // Assumes elementCount is <= newCapacity
448 // assert elementCount <= newCapacity;
H A DHashMap.java536 int newCapacity = Collections.roundUpToPowerOfTwo(capacityForInitSize(numMappings));
539 if (newCapacity <= oldCapacity) {
542 if (newCapacity == oldCapacity * 2) {
548 HashMapEntry<K, V>[] newTable = makeTable(newCapacity);
550 int newMask = newCapacity - 1;
566 * @param newCapacity must be a power of two
568 private HashMapEntry<K, V>[] makeTable(int newCapacity) { argument
570 = (HashMapEntry<K, V>[]) new HashMapEntry[newCapacity];
572 threshold = (newCapacity >> 1) + (newCapacity >>
[all...]
H A DHashtable.java440 int newCapacity = Collections.roundUpToPowerOfTwo(capacityForInitSize(numMappings));
443 if (newCapacity <= oldCapacity) {
449 if (newCapacity == oldCapacity * 2) {
455 HashtableEntry<K, V>[] newTable = makeTable(newCapacity);
457 int newMask = newCapacity - 1;
484 * @param newCapacity must be a power of two
486 private HashtableEntry<K, V>[] makeTable(int newCapacity) { argument
488 = (HashtableEntry<K, V>[]) new HashtableEntry[newCapacity];
490 threshold = (newCapacity >> 1) + (newCapacity >>
[all...]
/libcore/luni/src/main/native/
H A Dorg_apache_harmony_xml_ExpatParser.cpp72 int newCapacity = capacity * 2; local
73 jstring* newArray = new jstring[newCapacity];
82 capacity = newCapacity;

Completed in 103 milliseconds