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
|
|