-
- All Implemented Interfaces:
-
java.util.Map
public class AndroidMockKMap extends ReferenceQueue<Object> implements Map<Object, MockKInvocationHandler>
A map mock -> adapter that holds weak references to the mocks and cleans them up when a stale reference is found.
-
-
Method Summary
Modifier and Type Method Description intsize()booleanisEmpty()booleancontainsKey(Object mock)booleancontainsValue(Object adapter)MockKInvocationHandlerget(Object mock)MockKInvocationHandlerput(Object mock, MockKInvocationHandler adapter)MockKInvocationHandlerremove(Object mock)voidputAll(Map<out Object, out MockKInvocationHandler> map)voidclear()Set<Object>keySet()Collection<MockKInvocationHandler>values()Set<Map.Entry<Object, MockKInvocationHandler>>entrySet()booleanisInternalHashMap(Object instance)-
Methods inherited from class java.lang.ref.ReferenceQueue
poll, remove -
Methods inherited from class java.util.Map
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
size
int size()
-
isEmpty
boolean isEmpty()
-
containsKey
boolean containsKey(Object mock)
-
containsValue
boolean containsValue(Object adapter)
-
clear
void clear()
-
values
Collection<MockKInvocationHandler> values()
-
isInternalHashMap
boolean isInternalHashMap(Object instance)
-
-
-
-