Package hash.studio

Class HashUtils

java.lang.Object
hash.studio.HashUtils

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

    Constructors 
    Constructor Description
    HashUtils()  
  • Method Summary

    Modifier and Type Method Description
    static int toIndex​(java.lang.Object key, int maxExclusive)  

    Methods inherited from class java.lang.Object

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

  • Method Details

    • toIndex

      public static int toIndex​(java.lang.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