protected class MultiBinaryLongMap.PrimaryBinaryLongMap.CompressedPrimaryBinaryLongMap extends MultiBinaryLongMap.SafeBinaryLongMap
MultiBinaryLongMap.WrapperBinaryLongMap.WrapperIteratorBinaryLongMap.Entry, BinaryLongMap.EntryVisitor, BinaryLongMap.SimpleMapImplf_lockExclusive, f_lockSharedm_blm| Constructor and Description |
|---|
CompressedPrimaryBinaryLongMap(BinaryLongMap blmKeyTree, ReentrantReadWriteLock rwLock)
Construct a CompressedPrimaryBinaryLongMap.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Initialize the map to an empty state.
|
void |
put(Binary binKey, long lValue)
Blindly store the passed value for the specified key, adding the key if it is not already in the map, or replacing the current value if the key is in the map.
|
boolean |
putIfAbsent(Binary binKey, long lValue)
Store the passed value for the specified key, only if the key does not currently exist in the map.
|
void |
remove(Binary binKey)
Blindly remove the specified Binary key from the map.
|
boolean |
remove(Binary binKey, long lValue)
Remove the specified Binary key from the map iff it exists in the map and is associated with the specified value.
|
get, getMap, internKeys, keys, keys, release, replace, size, visit, visitAllsetMappublic CompressedPrimaryBinaryLongMap(BinaryLongMap blmKeyTree, ReentrantReadWriteLock rwLock)
blmKeyTree - the BinaryLongMap holding the keys for the outer MultiBinaryLongMaprwLock - the master ReadWriteReentrantLockpublic void put(Binary binKey, long lValue)
Note that associating the value zero with a key is analogous to removing the key.
put in interface BinaryLongMapput in class MultiBinaryLongMap.SafeBinaryLongMapbinKey - the Binary key to add or updatelValue - the value to associate with the keypublic boolean putIfAbsent(Binary binKey, long lValue)
Note that associating the value zero with a key using this method will have no effect, since were that key already present, there would be no change, and were it not present, the value zero is analogous to removing the key, which again is no change (since it is not present).
putIfAbsent in interface BinaryLongMapputIfAbsent in class MultiBinaryLongMap.SafeBinaryLongMapbinKey - a Binary keylValue - the new value to associate with the passed keypublic void remove(Binary binKey)
remove in interface BinaryLongMapremove in class MultiBinaryLongMap.SafeBinaryLongMapbinKey - a Binary keypublic boolean remove(Binary binKey, long lValue)
Note that removing an association whose value is zero has no effect.
remove in interface BinaryLongMapremove in class MultiBinaryLongMap.SafeBinaryLongMapbinKey - a Binary keylValue - the value that the key must have in order to be removedpublic void clear()
clear in interface BinaryLongMapclear in class MultiBinaryLongMap.SafeBinaryLongMap