Home
last modified time | relevance | path

Searched refs:newCapacity (Results 1 – 14 of 14) sorted by relevance

/libcore/ojluni/src/main/java/java/io/
DByteArrayOutputStream.java113 int newCapacity = oldCapacity << 1; in grow() local
114 if (newCapacity - minCapacity < 0) in grow()
115 newCapacity = minCapacity; in grow()
116 if (newCapacity - MAX_ARRAY_SIZE > 0) in grow()
117 newCapacity = hugeCapacity(minCapacity); in grow()
118 buf = Arrays.copyOf(buf, newCapacity); in grow()
DObjectInputStream.java3623 int newCapacity = (entries.length << 1) + 1; in grow() local
3625 byte[] newStatus = new byte[newCapacity]; in grow()
3626 Object[] newEntries = new Object[newCapacity]; in grow()
3627 HandleList[] newDeps = new HandleList[newCapacity]; in grow()
/libcore/ojluni/src/main/java/java/lang/
DAbstractStringBuilder.java125 newCapacity(minimumCapacity)); in ensureCapacityInternal()
148 private int newCapacity(int minCapacity) { in newCapacity() method in AbstractStringBuilder
150 int newCapacity = (value.length << 1) + 2; in newCapacity() local
151 if (newCapacity - minCapacity < 0) { in newCapacity()
152 newCapacity = minCapacity; in newCapacity()
154 return (newCapacity <= 0 || MAX_ARRAY_SIZE - newCapacity < 0) in newCapacity()
156 : newCapacity; in newCapacity()
/libcore/luni/src/main/java/libcore/io/
DIoUtils.java352 final int newCapacity = capacity * 2; in readFully() local
353 byte[] newBytes = new byte[newCapacity]; in readFully()
356 capacity = newCapacity; in readFully()
/libcore/ojluni/src/main/java/java/util/
DVector.java260 int newCapacity = oldCapacity + ((capacityIncrement > 0) ? in grow() local
262 if (newCapacity - minCapacity < 0) in grow()
263 newCapacity = minCapacity; in grow()
264 if (newCapacity - MAX_ARRAY_SIZE > 0) in grow()
265 newCapacity = hugeCapacity(minCapacity); in grow()
266 elementData = Arrays.copyOf(elementData, newCapacity); in grow()
DPriorityQueue.java294 int newCapacity = oldCapacity + ((oldCapacity < 64) ? in grow() local
298 if (newCapacity - MAX_ARRAY_SIZE > 0) in grow()
299 newCapacity = hugeCapacity(minCapacity); in grow()
300 queue = Arrays.copyOf(queue, newCapacity); in grow()
DWeakHashMap.java484 void resize(int newCapacity) { in resize() argument
492 Entry<K,V>[] newTable = newTable(newCapacity); in resize()
502 threshold = (int)(newCapacity * loadFactor); in resize()
558 int newCapacity = table.length; in putAll() local
559 while (newCapacity < targetCapacity) in putAll()
560 newCapacity <<= 1; in putAll()
561 if (newCapacity > table.length) in putAll()
562 resize(newCapacity); in putAll()
DArrayList.java269 int newCapacity = oldCapacity + (oldCapacity >> 1); in grow() local
270 if (newCapacity - minCapacity < 0) in grow()
271 newCapacity = minCapacity; in grow()
272 if (newCapacity - MAX_ARRAY_SIZE > 0) in grow()
273 newCapacity = hugeCapacity(minCapacity); in grow()
275 elementData = Arrays.copyOf(elementData, newCapacity); in grow()
DHashtable.java396 int newCapacity = (oldCapacity << 1) + 1; in rehash() local
397 if (newCapacity - MAX_ARRAY_SIZE > 0) { in rehash()
401 newCapacity = MAX_ARRAY_SIZE; in rehash()
403 HashtableEntry<?,?>[] newMap = new HashtableEntry<?,?>[newCapacity]; in rehash()
406 threshold = (int)Math.min(newCapacity * loadFactor, MAX_ARRAY_SIZE + 1); in rehash()
414 int index = (e.hash & 0x7FFFFFFF) % newCapacity; in rehash()
DArrayDeque.java156 int newCapacity = n << 1; in doubleCapacity() local
157 if (newCapacity < 0) in doubleCapacity()
159 Object[] a = new Object[newCapacity]; in doubleCapacity()
DIdentityHashMap.java457 private boolean resize(int newCapacity) { in resize() argument
459 int newLength = newCapacity * 2; in resize()
/libcore/ojluni/src/main/java/java/util/concurrent/
DScheduledThreadPoolExecutor.java958 int newCapacity = oldCapacity + (oldCapacity >> 1); // grow 50% in grow() local
959 if (newCapacity < 0) // overflow in grow()
960 newCapacity = Integer.MAX_VALUE; in grow()
961 queue = Arrays.copyOf(queue, newCapacity); in grow()
/libcore/ojluni/annotations/hiddenapi/java/lang/
DAbstractStringBuilder.java57 private int newCapacity(int minCapacity) { in newCapacity() method in AbstractStringBuilder
/libcore/luni/src/main/native/
Dorg_apache_harmony_xml_ExpatParser.cpp76 int newCapacity = capacity * 2; in push() local
77 jstring* newArray = new jstring[newCapacity]; in push()
86 capacity = newCapacity; in push()