Code example for ConcurrentMap

Methods: containsValue

0
 
    /** 
     * Checks if the given value is currently hold in memory. 
     */ 
    public synchronized boolean containsValue(Object value) {
        return cache.containsValue(value);
    } 
 
    @SuppressWarnings("unchecked") 
    public synchronized ValT remove(Object key) {
        ValT value = removeKey(key);
 
        if (isDiskCacheEnabled) {
            File cachedValue = getFileForKey((KeyT) key);
            if (cachedValue.exists()) {
                cachedValue.delete();
            } 
        } 
 
        return value;
    }