Class Djb2


  • public final class Djb2
    extends java.lang.Object
    An implementation of the djb2 hash function.
    • Constructor Summary

      Constructors 
      Constructor Description
      Djb2()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static int hash​(java.lang.String str)
      An implementation of Dan Bernstein's djb2 hash function which is slightly modified.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Djb2

        public Djb2()
    • Method Detail

      • hash

        public static int hash​(java.lang.String str)
        An implementation of Dan Bernstein's djb2 hash function which is slightly modified. Instead of the initial hash being 5381, it is zero.
        Parameters:
        str - The string to hash.
        Returns:
        The hash code.