Package 

Class AndroidMockKMap

  • All Implemented Interfaces:
    java.util.Map

    
    public class AndroidMockKMap
    extends ReferenceQueue<T> implements Map<K, V>
                        

    A map mock -> adapter that holds weak references to the mocks and cleans them up when a stale reference is found.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      int size()
      boolean isEmpty()
      boolean containsKey(Object mock)
      boolean containsValue(Object adapter)
      MockKInvocationHandler get(Object mock)
      MockKInvocationHandler put(Object mock, MockKInvocationHandler adapter)
      MockKInvocationHandler remove(Object mock)
      void putAll(Map<out Object, out MockKInvocationHandler> map)
      void clear()
      Set<Object> keySet()
      Collection<MockKInvocationHandler> values()
      Set<Map.Entry<Object, MockKInvocationHandler>> entrySet()
      boolean isInternalHashMap(@NotNull() Object instance)
      • Methods inherited from class java.lang.ref.ReferenceQueue

        poll, remove
      • Methods inherited from class java.util.Map

        compute, computeIfAbsent, computeIfPresent, copyOf, entry, equals, forEach, getOrDefault, hashCode, merge, of, ofEntries, putIfAbsent, remove, replace, replace, replaceAll
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait