List of usage examples for java.util AbstractMap.SimpleImmutableEntry equals
public boolean equals(Object o)
From source file:org.alfresco.repo.cache.DefaultSimpleCache.java
/** * <code>put</code> method that may be used to check for updates in a thread-safe manner. * //from ww w . j a v a2s . c om * @return <code>true</code> if the put resulted in a change in value, <code>false</code> otherwise. */ public boolean putAndCheckUpdate(K key, V value) { AbstractMap.SimpleImmutableEntry<K, V> kvp = new AbstractMap.SimpleImmutableEntry<K, V>(key, value); AbstractMap.SimpleImmutableEntry<K, V> priorKVP = map.put(key, kvp); return priorKVP != null && (!priorKVP.equals(kvp)); }