Package com.helixframework.collections
Class TrackingMap<K,V>
java.lang.Object
com.helixframework.collections.TrackingMap<K,V>
- Type Parameters:
K- key typeV- value type
- All Implemented Interfaces:
Map<K,V>
Map implementation wrapper that tracks access to its data.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classTracked operation.static enumEnumeration of tracked operations. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets a set of all accessed keys.voidclear()booleancontainsKey(Object key) booleancontainsValue(Object value) entrySet()Gets the history of all operations in sequential order.booleanisEmpty()keySet()voidintsize()values()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Constructor Details
-
TrackingMap
Creates a new instance ofTrackingMap.- Parameters:
wrappedMap- map to wrap
-
-
Method Details
-
size
public int size() -
isEmpty
public boolean isEmpty() -
containsKey
- Specified by:
containsKeyin interfaceMap<K,V>
-
containsValue
- Specified by:
containsValuein interfaceMap<K,V>
-
get
-
put
-
remove
-
putAll
-
clear
public void clear() -
keySet
-
values
-
entrySet
-
getHistory
Gets the history of all operations in sequential order.- Returns:
- history of operations
-
accessedKeys
Gets a set of all accessed keys.- Returns:
- accessed keys
-