Home
last modified time | relevance | path

Searched refs:initialCapacity (Results 1 – 25 of 44) sorted by relevance

12

/libcore/ojluni/src/test/java/util/IdentityHashMap/
DCapacity.java122 int initialCapacity = capacity(m); in canInsertExpectedItemsWithoutResizing() local
124 assertCapacity(m, initialCapacity); in canInsertExpectedItemsWithoutResizing()
130 assertCapacity(m, 2 * initialCapacity); in canInsertExpectedItemsWithoutResizing()
135 initialCapacity = capacity(m); in canInsertExpectedItemsWithoutResizing()
137 assertCapacity(m, initialCapacity); in canInsertExpectedItemsWithoutResizing()
143 assertCapacity(m, 2 * initialCapacity); in canInsertExpectedItemsWithoutResizing()
153 int initialCapacity = capacity(m); in threshold() local
154 while (capacity(m) == initialCapacity) in threshold()
167 int initialCapacity = capacity(m); in passingThresholdCausesResize() local
170 assertCapacity(m, initialCapacity); in passingThresholdCausesResize()
[all …]
/libcore/ojluni/src/main/java/java/util/stream/
DAbstractSpinedBuffer.java89 protected AbstractSpinedBuffer(int initialCapacity) { in AbstractSpinedBuffer() argument
90 if (initialCapacity < 0) in AbstractSpinedBuffer()
91 throw new IllegalArgumentException("Illegal Capacity: "+ initialCapacity); in AbstractSpinedBuffer()
94 … Integer.SIZE - Integer.numberOfLeadingZeros(initialCapacity - 1)); in AbstractSpinedBuffer()
DSpinedBuffer.java99 public SpinedBuffer(int initialCapacity) { in SpinedBuffer() argument
100 super(initialCapacity); in SpinedBuffer()
455 OfPrimitive(int initialCapacity) { in OfPrimitive() argument
456 super(initialCapacity); in OfPrimitive()
735 public OfInt(int initialCapacity) { in OfInt() argument
736 super(initialCapacity); in OfInt()
852 public OfLong(int initialCapacity) { in OfLong() argument
853 super(initialCapacity); in OfLong()
971 public OfDouble(int initialCapacity) { in OfDouble() argument
972 super(initialCapacity); in OfDouble()
/libcore/ojluni/src/test/java/util/HashMap/
DWhiteBoxResizeTest.java120 int initialCapacity = rnd.nextInt(2, 128); in capacityTestInitialCapacity() local
122 () -> new HashMap<>(initialCapacity), in capacityTestInitialCapacity()
123 () -> new HashMap<>(initialCapacity, 0.75f), in capacityTestInitialCapacity()
124 () -> new LinkedHashMap<>(initialCapacity), in capacityTestInitialCapacity()
125 () -> new LinkedHashMap<>(initialCapacity, 0.75f)); in capacityTestInitialCapacity()
132 assertEquals(capacity(map), tableSizeFor(initialCapacity)); in capacityTestInitialCapacity()
/libcore/ojluni/src/main/java/java/util/
DHashSet.java137 public HashSet(int initialCapacity, float loadFactor) { in HashSet() argument
138 map = new HashMap<>(initialCapacity, loadFactor); in HashSet()
153 public HashSet(int initialCapacity) { in HashSet() argument
154 map = new HashMap<>(initialCapacity); in HashSet()
170 HashSet(int initialCapacity, float loadFactor, boolean dummy) { in HashSet() argument
171 map = new LinkedHashMap<>(initialCapacity, loadFactor); in HashSet()
DLinkedHashSet.java142 public LinkedHashSet(int initialCapacity, float loadFactor) { in LinkedHashSet() argument
143 super(initialCapacity, loadFactor, true); in LinkedHashSet()
158 public LinkedHashSet(int initialCapacity) { in LinkedHashSet() argument
159 super(initialCapacity, .75f, true); in LinkedHashSet()
DVector.java141 public Vector(int initialCapacity, int capacityIncrement) { in Vector() argument
143 if (initialCapacity < 0) in Vector()
145 initialCapacity); in Vector()
146 this.elementData = new Object[initialCapacity]; in Vector()
158 public Vector(int initialCapacity) { in Vector() argument
159 this(initialCapacity, 0); in Vector()
DHashtable.java187 public Hashtable(int initialCapacity, float loadFactor) { in Hashtable() argument
188 if (initialCapacity < 0) in Hashtable()
190 initialCapacity); in Hashtable()
194 if (initialCapacity==0) in Hashtable()
195 initialCapacity = 1; in Hashtable()
197 table = new HashtableEntry<?,?>[initialCapacity]; in Hashtable()
198 threshold = (int)Math.min(initialCapacity * loadFactor, MAX_ARRAY_SIZE + 1); in Hashtable()
209 public Hashtable(int initialCapacity) { in Hashtable() argument
210 this(initialCapacity, 0.75f); in Hashtable()
DPriorityQueue.java148 public PriorityQueue(int initialCapacity) { in PriorityQueue() argument
149 this(initialCapacity, null); in PriorityQueue()
176 public PriorityQueue(int initialCapacity, in PriorityQueue() argument
180 if (initialCapacity < 1) in PriorityQueue()
182 this.queue = new Object[initialCapacity]; in PriorityQueue()
DWeakHashMap.java206 public WeakHashMap(int initialCapacity, float loadFactor) { in WeakHashMap() argument
207 if (initialCapacity < 0) in WeakHashMap()
209 initialCapacity); in WeakHashMap()
210 if (initialCapacity > MAXIMUM_CAPACITY) in WeakHashMap()
211 initialCapacity = MAXIMUM_CAPACITY; in WeakHashMap()
217 while (capacity < initialCapacity) in WeakHashMap()
231 public WeakHashMap(int initialCapacity) { in WeakHashMap() argument
232 this(initialCapacity, DEFAULT_LOAD_FACTOR); in WeakHashMap()
/libcore/ojluni/annotations/hiddenapi/java/util/
DHashSet.java42 public HashSet(int initialCapacity, float loadFactor) { in HashSet() argument
46 public HashSet(int initialCapacity) { in HashSet() argument
50 HashSet(int initialCapacity, float loadFactor, boolean fake) { in HashSet() argument
DLinkedHashMap.java33 public LinkedHashMap(int initialCapacity, float loadFactor) { in LinkedHashMap() argument
37 public LinkedHashMap(int initialCapacity) { in LinkedHashMap() argument
49 public LinkedHashMap(int initialCapacity, float loadFactor, boolean accessOrder) { in LinkedHashMap() argument
DPriorityQueue.java37 public PriorityQueue(int initialCapacity) { in PriorityQueue() argument
45 public PriorityQueue(int initialCapacity, java.util.Comparator<? super E> comparator) { in PriorityQueue() argument
DVector.java37 public Vector(int initialCapacity, int capacityIncrement) { in Vector() argument
41 public Vector(int initialCapacity) { in Vector() argument
/libcore/ojluni/annotations/mmodule/java/util/
DLinkedHashMap.annotated.java33 public LinkedHashMap(int initialCapacity, float loadFactor) { throw new RuntimeException("Stub!"); } in LinkedHashMap() argument
35 public LinkedHashMap(int initialCapacity) { throw new RuntimeException("Stub!"); } in LinkedHashMap() argument
41 public LinkedHashMap(int initialCapacity, float loadFactor, boolean accessOrder) { throw new Runtim… in LinkedHashMap() argument
/libcore/ojluni/annotations/flagged_api/java/util/
DLinkedHashMap.annotated.java32 public LinkedHashMap(int initialCapacity, float loadFactor) { throw new RuntimeException("Stub!"); } in LinkedHashMap() argument
34 public LinkedHashMap(int initialCapacity) { throw new RuntimeException("Stub!"); } in LinkedHashMap() argument
40 public LinkedHashMap(int initialCapacity, float loadFactor, boolean accessOrder) { throw new Runtim… in LinkedHashMap() argument
DHashSet.annotated.java36 public HashSet(int initialCapacity, float loadFactor) { throw new RuntimeException("Stub!"); } in HashSet() argument
38 public HashSet(int initialCapacity) { throw new RuntimeException("Stub!"); } in HashSet() argument
DLinkedHashSet.annotated.java32 public LinkedHashSet(int initialCapacity, float loadFactor) { throw new RuntimeException("Stub!"); } in LinkedHashSet() argument
34 public LinkedHashSet(int initialCapacity) { throw new RuntimeException("Stub!"); } in LinkedHashSet() argument
DHashMap.annotated.java32 public HashMap(int initialCapacity, float loadFactor) { throw new RuntimeException("Stub!"); } in HashMap() argument
34 public HashMap(int initialCapacity) { throw new RuntimeException("Stub!"); } in HashMap() argument
/libcore/ojluni/annotations/sdk/nullability/java/util/
DHashSet.annotated.java37 public HashSet(int initialCapacity, float loadFactor) { throw new RuntimeException("Stub!"); } in HashSet() argument
39 public HashSet(int initialCapacity) { throw new RuntimeException("Stub!"); } in HashSet() argument
DWeakHashMap.annotated.java35 public WeakHashMap(int initialCapacity, float loadFactor) { throw new RuntimeException("Stub!"); } in WeakHashMap() argument
37 public WeakHashMap(int initialCapacity) { throw new RuntimeException("Stub!"); } in WeakHashMap() argument
DHashMap.annotated.java33 public HashMap(int initialCapacity, float loadFactor) { throw new RuntimeException("Stub!"); } in HashMap() argument
35 public HashMap(int initialCapacity) { throw new RuntimeException("Stub!"); } in HashMap() argument
/libcore/ojluni/src/main/java/sun/util/locale/
DLocaleObjectCache.java47 public LocaleObjectCache(int initialCapacity, float loadFactor, int concurrencyLevel) { in LocaleObjectCache() argument
48 map = new ConcurrentHashMap<>(initialCapacity, loadFactor, concurrencyLevel); in LocaleObjectCache()
/libcore/ojluni/annotations/hiddenapi/java/util/concurrent/
DPriorityBlockingQueue.java48 public PriorityBlockingQueue(int initialCapacity) { in PriorityBlockingQueue() argument
52 public PriorityBlockingQueue(int initialCapacity, java.util.Comparator<? super E> comparator) { in PriorityBlockingQueue() argument
/libcore/ojluni/src/main/java/java/util/concurrent/
DPriorityBlockingQueue.java202 public PriorityBlockingQueue(int initialCapacity) { in PriorityBlockingQueue() argument
203 this(initialCapacity, null); in PriorityBlockingQueue()
218 public PriorityBlockingQueue(int initialCapacity, in PriorityBlockingQueue() argument
220 if (initialCapacity < 1) in PriorityBlockingQueue()
223 this.queue = new Object[Math.max(1, initialCapacity)]; in PriorityBlockingQueue()

12