Skip to content
Snippets Groups Projects
Commit 0a5a4681 authored by ArcherShao's avatar ArcherShao Committed by Reynold Xin
Browse files

Update OpenHashSet.scala

Modify wrong comment of function addWithoutResize.

Author: ArcherShao <ArcherShao@users.noreply.github.com>

Closes #667 from ArcherShao/patch-3 and squashes the following commits:

a607358 [ArcherShao] Update OpenHashSet.scala
parent 3c64750b
No related branches found
No related tags found
No related merge requests found
......@@ -115,10 +115,10 @@ class OpenHashSet[@specialized(Long, Int) T: ClassTag](
* The caller is responsible for calling rehashIfNeeded.
*
* Use (retval & POSITION_MASK) to get the actual position, and
* (retval & EXISTENCE_MASK) != 0 for prior existence.
* (retval & NONEXISTENCE_MASK) == 0 for prior existence.
*
* @return The position where the key is placed, plus the highest order bit is set if the key
* exists previously.
* does not exists previously.
*/
def addWithoutResize(k: T): Int = {
var pos = hashcode(hasher.hash(k)) & _mask
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment