Package hash.studio

Class HashUtils

java.lang.Object
hash.studio.HashUtils

public class HashUtils extends Object
Author:
__STUDENT_NAME__, Dennis Cosgrove (http://www.cse.wustl.edu/~cosgroved/)
  • Constructor Details

    • HashUtils

      public HashUtils()
  • Method Details

    • toIndex

      public static int toIndex​(Object key, int maxExclusive)
      Parameters:
      key - the key to hash
      maxExclusive - the exclusive upper bound
      Returns:
      floor modulus of key's hashCode and maxExclusive if not null, otherwise 0