title: Set minimum size of a Map in Java
body: <p>In my program key-value pairs are frequently added to a <code>Map</code> until 1G of pairs are added. Map resizing slows down the process. How can I set minimum <code>Map</code> size to, for example 1000000007 (which is a prime)? </p>