com.google.common.collect
Class GenericMapMaker<K0,V0>

java.lang.Object
  extended by com.google.common.collect.GenericMapMaker<K0,V0>
Type Parameters:
K0 - the base type for all key types of maps built by this map maker
V0 - the base type for all value types of maps built by this map maker
Direct Known Subclasses:
MapMaker

@Beta
@GwtCompatible(emulated=true)
public abstract class GenericMapMaker<K0,V0>
extends Object

A class exactly like MapMaker, except restricted in the types of maps it can build. This type is returned by MapMaker.evictionListener(com.google.common.collect.MapEvictionListener) to prevent the user from trying to build a map that's incompatible with the key and value types of the listener.

Since:
7
Author:
Kevin Bourrillion

Method Summary
abstract  GenericMapMaker<K0,V0> concurrencyLevel(int concurrencyLevel)
          See MapMaker.concurrencyLevel.
abstract  GenericMapMaker<K0,V0> expiration(long duration, TimeUnit unit)
          See MapMaker.expiration(long, java.util.concurrent.TimeUnit).
abstract  GenericMapMaker<K0,V0> expireAfterAccess(long duration, TimeUnit unit)
          See MapMaker.expireAfterAccess(long, java.util.concurrent.TimeUnit).
abstract  GenericMapMaker<K0,V0> expireAfterWrite(long duration, TimeUnit unit)
          See MapMaker.expireAfterWrite(long, java.util.concurrent.TimeUnit).
abstract  GenericMapMaker<K0,V0> initialCapacity(int initialCapacity)
          See MapMaker.initialCapacity.
abstract
<K extends K0,V extends V0>
ConcurrentMap<K,V>
makeComputingMap(Function<? super K,? extends V> computingFunction)
          See MapMaker.makeComputingMap(com.google.common.base.Function).
abstract
<K extends K0,V extends V0>
ConcurrentMap<K,V>
makeMap()
          See MapMaker.makeMap().
abstract  GenericMapMaker<K0,V0> maximumSize(int maximumSize)
          See MapMaker.maximumSize.
abstract  GenericMapMaker<K0,V0> softKeys()
          See MapMaker.softKeys().
abstract  GenericMapMaker<K0,V0> softValues()
          See MapMaker.softValues().
abstract  GenericMapMaker<K0,V0> weakKeys()
          See MapMaker.weakKeys().
abstract  GenericMapMaker<K0,V0> weakValues()
          See MapMaker.weakValues().
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

initialCapacity

public abstract GenericMapMaker<K0,V0> initialCapacity(int initialCapacity)
See MapMaker.initialCapacity.


maximumSize

@Beta
public abstract GenericMapMaker<K0,V0> maximumSize(int maximumSize)
See MapMaker.maximumSize.

Since:
8

concurrencyLevel

@GwtIncompatible(value="java.util.concurrent.ConcurrentHashMap concurrencyLevel")
public abstract GenericMapMaker<K0,V0> concurrencyLevel(int concurrencyLevel)
See MapMaker.concurrencyLevel.


weakKeys

@GwtIncompatible(value="java.lang.ref.WeakReference")
public abstract GenericMapMaker<K0,V0> weakKeys()
See MapMaker.weakKeys().


softKeys

@GwtIncompatible(value="java.lang.ref.SoftReference")
public abstract GenericMapMaker<K0,V0> softKeys()
See MapMaker.softKeys().


weakValues

@GwtIncompatible(value="java.lang.ref.WeakReference")
public abstract GenericMapMaker<K0,V0> weakValues()
See MapMaker.weakValues().


softValues

@GwtIncompatible(value="java.lang.ref.SoftReference")
public abstract GenericMapMaker<K0,V0> softValues()
See MapMaker.softValues().


expiration

public abstract GenericMapMaker<K0,V0> expiration(long duration,
                                                  TimeUnit unit)
See MapMaker.expiration(long, java.util.concurrent.TimeUnit).


expireAfterWrite

@Beta
public abstract GenericMapMaker<K0,V0> expireAfterWrite(long duration,
                                                             TimeUnit unit)
See MapMaker.expireAfterWrite(long, java.util.concurrent.TimeUnit).

Since:
8

expireAfterAccess

@Beta
@GwtIncompatible(value="To be supported")
public abstract GenericMapMaker<K0,V0> expireAfterAccess(long duration,
                                                                                   TimeUnit unit)
See MapMaker.expireAfterAccess(long, java.util.concurrent.TimeUnit).

Since:
8

makeMap

public abstract <K extends K0,V extends V0> ConcurrentMap<K,V> makeMap()
See MapMaker.makeMap().


makeComputingMap

public abstract <K extends K0,V extends V0> ConcurrentMap<K,V> makeComputingMap(Function<? super K,? extends V> computingFunction)
See MapMaker.makeComputingMap(com.google.common.base.Function).