* SkipListMap, SkipListSet:
[libcds.git] / cds / container / skip_list_set_rcu.h
index 32453bfa5eccb604c7402eb7524efde2e7bceb9f..22bccb31368b99862deaba5ede98396ee9fcb4e2 100644 (file)
@@ -367,7 +367,6 @@ namespace cds { namespace container {
                 sp.release();
             return bRes;
         }
-
         //@cond
         // Deprecated, use update()
         template <typename Q, typename Func>
@@ -602,36 +601,47 @@ namespace cds { namespace container {
         }
         //@endcond
 
-        /// Find the key \p val
-        /** @anchor cds_nonintrusive_SkipListSet_rcu_find_val
-
-            The function searches the item with key equal to \p val
+        /// Checks whether the set contains \p key
+        /**
+            The function searches the item with key equal to \p key
             and returns \p true if it is found, and \p false otherwise.
 
-            Note the hash functor specified for class \p Traits template parameter
-            should accept a parameter of type \p Q that may be not the same as \ref value_type.
-
             The function applies RCU lock internally.
         */
         template <typename Q>
-        bool find( Q const & val )
+        bool contains( Q const & key )
+        {
+            return base_class::contains( key );
+        }
+        //@cond
+        // Deprecated, use contains()
+        template <typename Q>
+        bool find( Q const & key )
         {
-            return base_class::find( val );
+            return contains( key );
         }
+        //@endcond
 
-        /// Finds the key \p val using \p pred predicate for searching
+        /// Checks whether the set contains \p key using \p pred predicate for searching
         /**
-            The function is an analog of \ref cds_nonintrusive_SkipListSet_rcu_find_val "find(Q const&)"
-            but \p pred is used for key comparing.
+            The function is similar to <tt>contains( key )</tt> but \p pred is used for key comparing.
             \p Less functor has the interface like \p std::less.
             \p Less must imply the same element order as the comparator used for building the set.
         */
         template <typename Q, typename Less>
-        bool find_with( Q const& val, Less pred )
+        bool contains( Q const& key, Less pred )
         {
             CDS_UNUSED( pred );
-            return base_class::find_with( val, cds::details::predicate_wrapper< node_type, Less, typename maker::value_accessor >());
+            return base_class::contains( key, cds::details::predicate_wrapper< node_type, Less, typename maker::value_accessor >());
         }
+        //@cond
+        // Deprecated, use contains()
+        template <typename Q, typename Less>
+        bool find_with( Q const& key, Less pred )
+        {
+            return contains( key, pred );
+        }
+        //@endcond
 
         /// Finds \p key and return the item found
         /** \anchor cds_nonintrusive_SkipListSet_rcu_get