Method
computeCapacityHint
(final int estimatedNumberOfItems)
Source from the content-addressed store, hash-verified
| 1426 | } |
| 1427 | |
| 1428 | private static int computeCapacityHint(final int estimatedNumberOfItems) { |
| 1429 | // Default load factor for HashMap is 0.75, so N * 1.5 will be at the load |
| 1430 | // limit. We add +1 for a buffer. |
| 1431 | return (int)Math.ceil(estimatedNumberOfItems * 1.5 + 1.0); |
| 1432 | } |
| 1433 | |
| 1434 | /** |
| 1435 | * Returns a map of keys for which values were found in DB. |
Tested by
no test coverage detected