K0
- the base type for all key types of maps built by this map makerV0
- the base type for all value types of maps built by this map maker@Beta @GwtCompatible(emulated=true) public abstract class GenericMapMaker<K0,V0> extends Object
MapMaker
, except restricted in the types of maps
it can build. This type is returned by MapMaker.evictionListener(com.google.common.collect.MapEvictionListener<K, V>)
to
prevent the user from trying to build a map that's incompatible with the key
and value types of the listener.Modifier and Type | Method and Description |
---|---|
abstract GenericMapMaker<K0,V0> |
concurrencyLevel(int concurrencyLevel)
|
abstract GenericMapMaker<K0,V0> |
expiration(long duration,
TimeUnit unit)
|
abstract GenericMapMaker<K0,V0> |
expireAfterAccess(long duration,
TimeUnit unit)
|
abstract GenericMapMaker<K0,V0> |
expireAfterWrite(long duration,
TimeUnit unit)
|
abstract GenericMapMaker<K0,V0> |
initialCapacity(int initialCapacity)
|
abstract <K extends K0,V extends V0> |
makeComputingMap(Function<? super K,? extends V> computingFunction)
|
abstract <K extends K0,V extends V0> |
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()
|
abstract GenericMapMaker<K0,V0> |
weakKeys()
See
MapMaker.weakKeys() . |
abstract GenericMapMaker<K0,V0> |
weakValues()
|
public abstract GenericMapMaker<K0,V0> initialCapacity(int initialCapacity)
@Beta public abstract GenericMapMaker<K0,V0> maximumSize(int maximumSize)
MapMaker.maximumSize
.@GwtIncompatible(value="java.util.concurrent.ConcurrentHashMap concurrencyLevel") public abstract GenericMapMaker<K0,V0> concurrencyLevel(int concurrencyLevel)
@GwtIncompatible(value="java.lang.ref.WeakReference") public abstract GenericMapMaker<K0,V0> weakKeys()
MapMaker.weakKeys()
.@GwtIncompatible(value="java.lang.ref.SoftReference") public abstract GenericMapMaker<K0,V0> softKeys()
MapMaker.softKeys()
.@GwtIncompatible(value="java.lang.ref.WeakReference") public abstract GenericMapMaker<K0,V0> weakValues()
@GwtIncompatible(value="java.lang.ref.SoftReference") public abstract GenericMapMaker<K0,V0> softValues()
public abstract GenericMapMaker<K0,V0> expiration(long duration, TimeUnit unit)
@Beta public abstract GenericMapMaker<K0,V0> expireAfterWrite(long duration, TimeUnit unit)
@Beta @GwtIncompatible(value="To be supported") public abstract GenericMapMaker<K0,V0> expireAfterAccess(long duration, TimeUnit unit)
public abstract <K extends K0,V extends V0> ConcurrentMap<K,V> makeMap()
MapMaker.makeMap()
.public abstract <K extends K0,V extends V0> ConcurrentMap<K,V> makeComputingMap(Function<? super K,? extends V> computingFunction)
Copyright © 2010-2012. All Rights Reserved.