Specifies the maximum number of entries the map may contain. Note that the map
may evict an entry before this limit is exceeded. As the map size grows close to the maximum, the map evicts entries that are less likely to be used again. For example, the map may evict an entry because it hasn't been used recently or very often.
When {@code size} is zero, elements can be successfully added to the map, but are evictedimmediately. This has the same effect as invoking {@link #expireAfterWrite expireAfterWrite}{@code (0, unit)} or {@link #expireAfterAccess expireAfterAccess}{@code (0,unit)}. It can be useful in testing, or to disable caching temporarily without a code change.
Caching functionality in {@code MapMaker} is being moved to{@link com.google.common.cache.CacheBuilder}. This method is scheduled for deletion in Guava release 11.
@param size the maximum size of the map
@throws IllegalArgumentException if {@code size} is negative
@throws IllegalStateException if a maximum size was already set
@since Guava release 08