Home
last modified time | relevance | path

Searched refs:minCapacity (Results 1 – 15 of 15) sorted by relevance

/libcore/ojluni/src/main/java/java/io/
DByteArrayOutputStream.java90 private void ensureCapacity(int minCapacity) { in ensureCapacity() argument
92 if (minCapacity - buf.length > 0) in ensureCapacity()
93 grow(minCapacity); in ensureCapacity()
110 private void grow(int minCapacity) { in grow() argument
114 if (newCapacity - minCapacity < 0) in grow()
115 newCapacity = minCapacity; in grow()
117 newCapacity = hugeCapacity(minCapacity); in grow()
121 private static int hugeCapacity(int minCapacity) { in hugeCapacity() argument
122 if (minCapacity < 0) // overflow in hugeCapacity()
124 return (minCapacity > MAX_ARRAY_SIZE) ? in hugeCapacity()
/libcore/ojluni/src/main/java/java/util/
DVector.java228 public synchronized void ensureCapacity(int minCapacity) { in ensureCapacity() argument
229 if (minCapacity > 0) { in ensureCapacity()
231 ensureCapacityHelper(minCapacity); in ensureCapacity()
243 private void ensureCapacityHelper(int minCapacity) { in ensureCapacityHelper() argument
245 if (minCapacity - elementData.length > 0) in ensureCapacityHelper()
246 grow(minCapacity); in ensureCapacityHelper()
257 private void grow(int minCapacity) { in grow() argument
262 if (newCapacity - minCapacity < 0) in grow()
263 newCapacity = minCapacity; in grow()
265 newCapacity = hugeCapacity(minCapacity); in grow()
[all …]
DArrayList.java223 public void ensureCapacity(int minCapacity) { in ensureCapacity() argument
231 if (minCapacity > minExpand) { in ensureCapacity()
232 ensureExplicitCapacity(minCapacity); in ensureCapacity()
236 private void ensureCapacityInternal(int minCapacity) { in ensureCapacityInternal() argument
238 minCapacity = Math.max(DEFAULT_CAPACITY, minCapacity); in ensureCapacityInternal()
241 ensureExplicitCapacity(minCapacity); in ensureCapacityInternal()
244 private void ensureExplicitCapacity(int minCapacity) { in ensureExplicitCapacity() argument
248 if (minCapacity - elementData.length > 0) in ensureExplicitCapacity()
249 grow(minCapacity); in ensureExplicitCapacity()
266 private void grow(int minCapacity) { in grow() argument
[all …]
DAbstractCollection.java238 private static int hugeCapacity(int minCapacity) { in hugeCapacity() argument
239 if (minCapacity < 0) // overflow in hugeCapacity()
242 return (minCapacity > MAX_ARRAY_SIZE) ? in hugeCapacity()
DPriorityQueue.java291 private void grow(int minCapacity) { in grow() argument
299 newCapacity = hugeCapacity(minCapacity); in grow()
303 private static int hugeCapacity(int minCapacity) { in hugeCapacity() argument
304 if (minCapacity < 0) // overflow in hugeCapacity()
306 return (minCapacity > MAX_ARRAY_SIZE) ? in hugeCapacity()
DComparableTimSort.java883 private Object[] ensureCapacity(int minCapacity) {
884 if (tmpLen < minCapacity) {
886 int newSize = minCapacity;
895 newSize = minCapacity;
DTimSort.java916 private T[] ensureCapacity(int minCapacity) {
917 if (tmpLen < minCapacity) {
919 int newSize = minCapacity;
928 newSize = minCapacity;
/libcore/ojluni/annotations/hiddenapi/java/util/
DArrayList.java54 public void ensureCapacity(int minCapacity) { in ensureCapacity() argument
58 private void ensureCapacityInternal(int minCapacity) { in ensureCapacityInternal() argument
62 private void ensureExplicitCapacity(int minCapacity) { in ensureExplicitCapacity() argument
66 private void grow(int minCapacity) { in grow() argument
70 private static int hugeCapacity(int minCapacity) { in hugeCapacity() argument
DVector.java61 public synchronized void ensureCapacity(int minCapacity) { in ensureCapacity() argument
65 private void ensureCapacityHelper(int minCapacity) { in ensureCapacityHelper() argument
69 private void grow(int minCapacity) { in grow() argument
73 private static int hugeCapacity(int minCapacity) { in hugeCapacity() argument
DPriorityQueue.java73 private void grow(int minCapacity) { in grow() argument
77 private static int hugeCapacity(int minCapacity) { in hugeCapacity() argument
/libcore/ojluni/src/main/java/java/lang/
DAbstractStringBuilder.java148 private int newCapacity(int minCapacity) { in newCapacity() argument
151 if (newCapacity - minCapacity < 0) { in newCapacity()
152 newCapacity = minCapacity; in newCapacity()
155 ? hugeCapacity(minCapacity) in newCapacity()
159 private int hugeCapacity(int minCapacity) { in hugeCapacity() argument
160 if (Integer.MAX_VALUE - minCapacity < 0) { // overflow in hugeCapacity()
163 return (minCapacity > MAX_ARRAY_SIZE) in hugeCapacity()
164 ? minCapacity : MAX_ARRAY_SIZE; in hugeCapacity()
/libcore/ojluni/annotations/hiddenapi/java/lang/
DAbstractStringBuilder.java57 private int newCapacity(int minCapacity) { in newCapacity() argument
61 private int hugeCapacity(int minCapacity) { in hugeCapacity() argument
/libcore/ojluni/annotations/sdk/nullability/java/util/
DArrayList.annotated.java42 public void ensureCapacity(int minCapacity) { throw new RuntimeException("Stub!"); } in ensureCapacity() argument
DVector.annotated.java45 public synchronized void ensureCapacity(int minCapacity) { throw new RuntimeException("Stub!"); } in ensureCapacity() argument
/libcore/ojluni/src/test/java/util/concurrent/tck/
DArrayBlockingQueueTest.java105 int size, int minCapacity, int maxCapacity, boolean fair) { in populatedQueue() argument
107 int capacity = rnd.nextInt(minCapacity, maxCapacity + 1); in populatedQueue()