[concurrency-interest] ConcurrentNavigableMap has two keySet

Rémi Forax forax at univ-mlv.fr
Tue Jun 6 10:08:27 EDT 2006


It seems that during the last changes (perhaps corresponding to bug 6415641)
two different methods to obtain a NavigableSet
in ConcurrentNavigableMap was introduced.

|*keySet 
<http://download.java.net/jdk6/docs/api/java/util/concurrent/ConcurrentNavigableMap.html#keySet%28%29>*()| 

          Returns a |NavigableSet| 
<http://download.java.net/jdk6/docs/api/java/util/NavigableSet.html> 
view of the keys contained in this map.
|*navigableKeySet 
<http://download.java.net/jdk6/docs/api/java/util/concurrent/ConcurrentNavigableMap.html#navigableKeySet%28%29>*()| 

          Returns a |NavigableSet| 
<http://download.java.net/jdk6/docs/api/java/util/NavigableSet.html> 
view of the keys contained in this map.


see 
http://download.java.net/jdk6/docs/api/java/util/concurrent/ConcurrentNavigableMap.html

I think that navigableKeySet() can be removed from 
ConcurrentNavigableMap and
its implementation ConcurrentSkipListMap.

Rémi Forax






More information about the Concurrency-interest mailing list