K - KeyV - Valuepublic interface BaseMap<K,V> extends DistributedObject
IMap, 
TransactionalMap| Modifier and Type | Method and Description | 
|---|---|
boolean | 
containsKey(Object key)
Returns  
true if this map contains an entry for the specified
 key. | 
void | 
delete(Object key)
Removes the mapping for a key from this map if it is present. 
 | 
V | 
get(Object key)
Returns the value for the specified key, or  
null if this map does not contain this key. | 
boolean | 
isEmpty()
Returns true if this map contains no entries. 
 | 
V | 
put(K key,
   V value)
Associates the specified value with the specified key in this map
 If the map previously contained a mapping for
 the key, the old value is replaced by the specified value. 
 | 
V | 
putIfAbsent(K key,
           V value)
If the specified key is not already associated
 with a value, associate it with the given value. 
 | 
V | 
remove(Object key)
Removes the mapping for a key from this map if it is present. 
 | 
boolean | 
remove(Object key,
      Object value)
Removes the entry for a key only if currently mapped to a given value. 
 | 
V | 
replace(K key,
       V value)
Replaces the entry for a key only if currently mapped to some value. 
 | 
boolean | 
replace(K key,
       V oldValue,
       V newValue)
Replaces the entry for a key only if currently mapped to a given value. 
 | 
void | 
set(K key,
   V value)
Associates the specified value with the specified key in this map
 If the map previously contained a mapping for
 the key, the old value is replaced by the specified value. 
 | 
int | 
size()
Returns the number of entries in this map. 
 | 
destroy, getId, getName, getPartitionKey, getServiceNameboolean containsKey(Object key)
true if this map contains an entry for the specified
 key.key - keytrue if this map contains an entry for the specified keyV get(Object key)
null if this map does not contain this key.key - keyV put(K key, V value)
key - keyvalue - valuekey or null
 if there was no mapping for key.void set(K key, V value)
put(Object, Object)
 if the old value is not needed.key - keyvalue - valueV putIfAbsent(K key, V value)
   if (!map.containsKey(key))
       return map.put(key, value);
   else
       return map.get(key);
 except that the action is performed atomically.key - keyvalue - valuekey or null
 if there was no mapping for key.V replace(K key, V value)
   if (map.containsKey(key)) {
       return map.put(key, value);
   } else return null;
 except that the action is performed atomically.key - keyvalue - valuekey or null
 if there was no mapping for key.boolean replace(K key, V oldValue, V newValue)
   if (map.containsKey(key) && map.get(key).equals(oldValue)) {
       map.put(key, newValue);
       return true;
   } else return false;
 except that the action is performed atomically.key - keyoldValue - old valuenewValue - new valuetrue if the value was replacedV remove(Object key)
The map will not contain a mapping for the specified key once the call returns.
key - keykey or null
 if there was no mapping for key.void delete(Object key)
The map will not contain a mapping for the specified key once the call returns.
* This method is preferred to remove(Object)
 if the old value is not needed.
key - keyboolean remove(Object key, Object value)
   if (map.containsKey(key) && map.get(key).equals(value)) {
       map.remove(key);
       return true;
   } else return false;
 except that the action is performed atomically.key - keyvalue - valuetrue if the value was removedboolean isEmpty()
int size()
Copyright © 2014 Hazelcast, Inc.. All Rights Reserved.