code: public static int maxFill(int n, float f) {
  		return Math.min((int) Math.ceil((double) ((float) n * f)), n - 1);
  	}
docs: Returns the maximum number of entries that can be filled before rehashing.
  
  @param n the size of the backing array.
  @param f the load factor.
  @return the maximum number of entries before rehashing.