Package com.yourkit.probes
Class ObjectRowIndexMap<Key>
java.lang.Object
com.yourkit.probes.ObjectRowIndexMap<Key>
A weak map of an object to a row index which is a positive integer value.
Like an ordinary weak key map, this map does not prevent its keys from being discarded by the garbage collector.
Unlike an ordinary weak key map, this map can be used (keeps the stored mapping) even inside the key's finalize() method.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
ObjectRowIndexMap
public ObjectRowIndexMap()
-
-
Method Details
-
put
- Parameters:
key
- key with which the specified value is to be associatedvalue
- index to be associated with the specified key- Returns:
- previously mapped row index, or
Table.NO_ROW
if no row was mapped to the object
-
putAtomic
- Parameters:
key
- key with which the specified newValue is to be associatednewValue
- index to be associated with the specified keyexpectedValue
- the mapping will be changed only if the current mapping is expectedValue- Returns:
- true if mapping has been changed
-
putFirst
-
get
- Parameters:
key
- the key whose associated index is to be returned- Returns:
- mapped row index, or
Table.NO_ROW
if no row is mapped to the object
-
containsKey
-
remove
- Parameters:
key
- the key whose associated index is to be removed- Returns:
- previously mapped row index, or
Table.NO_ROW
if no row was mapped to the object
-