Package com.qfs.graph

Interface IConcurrentDirectedGraph<K,​V,​E>

    • Method Detail

      • putIfAbsent

        V putIfAbsent​(K key,
                      V value)
        If the specified key is not already associated with a value, associate it with the given value. Except that the action is performed atomically.
        Specified by:
        putIfAbsent in interface Map<K,​V>
        Parameters:
        key - key with which the specified value is to be associated
        value - value to be associated with the specified key
        Returns:
        the previous value associated with the specified key, or null if there was no mapping for the key. (A null return can also indicate that the map previously associated null with the key, if the implementation supports null values.)
      • remove

        boolean remove​(Object key,
                       Object value)
        Removes the entry for a key only if currently mapped to a given value. Except that the action is performed atomically.
        Specified by:
        remove in interface Map<K,​V>
        Parameters:
        key - key with which the specified value is associated
        value - value expected to be associated with the specified key
        Returns:
        true if the value was removed
      • replace

        boolean replace​(K key,
                        V oldValue,
                        V newValue)
        Replaces the entry for a key only if currently mapped to a given value. Except that the action is performed atomically.
        Specified by:
        replace in interface Map<K,​V>
        Parameters:
        key - key with which the specified value is associated
        oldValue - value expected to be associated with the specified key
        newValue - value to be associated with the specified key
        Returns:
        true if the value was replaced
      • replace

        V replace​(K key,
                  V value)
        Replaces the entry for a key only if currently mapped to some value. Except that the action is performed atomically.
        Specified by:
        replace in interface Map<K,​V>
        Parameters:
        key - key with which the specified value is associated
        value - value to be associated with the specified key
        Returns:
        the previous value associated with the specified key, or null if there was no mapping for the key. (A null return can also indicate that the map previously associated null with the key, if the implementation supports null values.)