There's more...

The ConcurrentSkipListMap class has other interesting methods. Some of them are as follows:

  • headMap(K toKey): Here, K is the class of the key values used in the parameterization of the ConcurrentSkipListMap object. This method returns a submap of the first elements of the map with the elements that have a key smaller than the one passed as a parameter.
  • tailMap(K fromKey): Here, K is the class of the key values used in the parameterization of the ConcurrentSkipListMap object. This method returns a submap of the last elements of the map with the elements that have a key greater than the one passed as a parameter.
  • putIfAbsent(K key, V Value): This method inserts the value specified as a parameter and also the key specified as a parameter if it doesn't exist in the map.
  • pollLastEntry(): This method returns and removes a Map.Entry object with the last element of the map.
  • replace(K key, V Value): This method replaces the value associated with the key specified as a parameter if this key exists in the map.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
13.59.8.162