Home
last modified time | relevance | path

Searched refs:oldCapacity (Results 1 – 12 of 12) sorted by relevance

/libcore/ojluni/src/test/java/util/ArrayList/
DArrayManagement.java81 static int newCapacity(int oldCapacity) { in newCapacity() argument
82 return oldCapacity + (oldCapacity >> 1); in newCapacity()
86 int oldCapacity = capacity(list); in ensureCapacity() local
91 (capacity(list) == oldCapacity) in ensureCapacity()
/libcore/ojluni/src/test/java/util/Vector/
DArrayManagement.java61 int oldCapacity = capacity(); in ensureCapacity() local
65 if (minCapacity <= oldCapacity) in ensureCapacity()
66 assertEquals(capacity(), oldCapacity); in ensureCapacity() local
75 static int newCapacity(int oldCapacity) { in newCapacity() argument
76 return 2 * oldCapacity; in newCapacity()
/libcore/ojluni/src/main/java/java/util/
DArrayDeque.java141 final int oldCapacity = elements.length; in grow() local
144 int jump = (oldCapacity < 64) ? (oldCapacity + 2) : (oldCapacity >> 1); in grow()
146 || (newCapacity = (oldCapacity + jump)) - MAX_ARRAY_SIZE > 0) in grow()
154 int newSpace = newCapacity - oldCapacity; in grow()
157 oldCapacity - head); in grow()
171 final int oldCapacity = elements.length, minCapacity; in newCapacity() local
172 if ((minCapacity = oldCapacity + needed) - MAX_ARRAY_SIZE > 0) { in newCapacity()
179 return (oldCapacity + jump - MAX_ARRAY_SIZE < 0) in newCapacity()
180 ? oldCapacity + jump in newCapacity()
DPriorityQueue.java299 int oldCapacity = queue.length; in grow() local
301 int newCapacity = ArraysSupport.newLength(oldCapacity, in grow()
302 minCapacity - oldCapacity, /* minimum growth */ in grow()
303 oldCapacity < 64 ? oldCapacity + 2 : oldCapacity >> 1 in grow()
DVector.java218 int oldCapacity = elementData.length; in trimToSize() local
219 if (elementCount < oldCapacity) { in trimToSize()
257 int oldCapacity = elementData.length; in grow() local
258 int newCapacity = ArraysSupport.newLength(oldCapacity, in grow()
259 minCapacity - oldCapacity, /* minimum growth */ in grow()
260 capacityIncrement > 0 ? capacityIncrement : oldCapacity in grow()
DArrayList.java239 int oldCapacity = elementData.length; in grow() local
240 if (oldCapacity > 0 || elementData != DEFAULTCAPACITY_EMPTY_ELEMENTDATA) { in grow()
241 int newCapacity = ArraysSupport.newLength(oldCapacity, in grow()
242 minCapacity - oldCapacity, /* minimum growth */ in grow()
243 oldCapacity >> 1 /* preferred growth */); in grow()
DHashtable.java409 int oldCapacity = table.length; in rehash() local
413 int newCapacity = (oldCapacity << 1) + 1; in rehash()
415 if (oldCapacity == MAX_ARRAY_SIZE) in rehash()
426 for (int i = oldCapacity ; i-- > 0 ;) { in rehash()
DWeakHashMap.java492 int oldCapacity = oldTable.length; in resize() local
493 if (oldCapacity == MAXIMUM_CAPACITY) { in resize()
/libcore/ojluni/src/main/java/java/io/
DByteArrayOutputStream.java114 int oldCapacity = buf.length; in grow() local
115 int newCapacity = oldCapacity << 1; in grow()
/libcore/ojluni/src/test/java/lang/StringBuffer/
DTrim.java98 int oldCapacity = sb.capacity(); in capacityCheck() local
101 if (oldCapacity == newCapacity) in capacityCheck()
/libcore/ojluni/src/main/java/java/lang/
DAbstractStringBuilder.java175 int oldCapacity = value.length >> coder; in ensureCapacityInternal() local
176 if (minimumCapacity - oldCapacity > 0) { in ensureCapacityInternal()
204 int oldCapacity = value.length >> coder; in newCapacity() local
205 int newCapacity = (oldCapacity << 1) + 2; in newCapacity()
/libcore/ojluni/src/main/java/java/util/concurrent/
DScheduledThreadPoolExecutor.java1013 int oldCapacity = queue.length; in grow() local
1014 int newCapacity = oldCapacity + (oldCapacity >> 1); // grow 50% in grow()