scala.util

JenkinsHash

object JenkinsHash extends AnyRef

Original algorithm due to Bob Jenkins. http://burtleburtle.net/bob/c/lookup3.c Scala version partially adapted from java version by Gray Watson. http://256.com/sources/jenkins_hash_java/JenkinsHash.java

This is based on the 1996 version, not the 2006 version, and could most likely stand some improvement; the collision rate is negligible in my tests, but performance merits investigation.

Inherits

  1. AnyRef
  2. Any

Value Members

  1. val MAX_VALUE: Long

  2. def equals(arg0: Any): Boolean

    This method is used to compare the receiver object (this) with the argument object (arg0) for equivalence

  3. def hash(buffer: Array[Byte], initialValue: Long): Long

    Hash a variable-length key into a 32-bit value

  4. def hashCode(): Int

    Returns a hash code value for the object

  5. def hashSeq(xs: Seq[Any]): Int

    Hash a sequence of anything into a 32-bit value

  6. def toString(): String

    Returns a string representation of the object