Class PTRHashMap

  • All Implemented Interfaces:

    
    public final class PTRHashMap<K extends Object, V extends Object>
    
                        

    Thread safe map class.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private Map<K, V> map
      private final Object lock
    • Constructor Summary

      Constructors 
      Constructor Description
      PTRHashMap()
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final Map<K, V> getMap()
      final Unit setMap(Map<K, V> map)
      final Object getLock()
      final Unit put(K k, V v)
      final Unit remove(K k)
      final Unit clear()
      final V get(K k)
      final Unit forEach(Function2<K, V, Unit> operator) For each pair in the map , operator is going to be invoked
      • Methods inherited from class java.lang.Object

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