Lines Matching defs:expectedSize
87 * that it <i>should</i> hold {@code expectedSize} elements without growth.
92 * @param expectedSize the number of elements you expect to add to the
95 * expectedSize} elements without resizing
96 * @throws IllegalArgumentException if {@code expectedSize} is negative
99 int expectedSize) {
100 return new HashMap<K, V>(capacity(expectedSize));
105 * long as it grows no larger than expectedSize and the load factor is >= its
108 static int capacity(int expectedSize) {
109 if (expectedSize < 3) {
110 checkArgument(expectedSize >= 0);
111 return expectedSize + 1;
113 if (expectedSize < Ints.MAX_POWER_OF_TWO) {
114 return expectedSize + expectedSize / 3;