Class HashUtils


  • public class HashUtils
    extends Object
    Common location to provide some utilities for common hashing tasks
    Author:
    markr
    • Constructor Detail

      • HashUtils

        public HashUtils()
    • Method Detail

      • createCombinedHashCode

        @SafeVarargs
        public static <T> int createCombinedHashCode​(T... primitiveKeys)
        When you want to avoid using nested hash maps and do not need access to the keys themselves, use a combined hash key via this method, so all can be stored in a single hash map which saves a lot of memory space.
        Type Parameters:
        T - type of the primitive keys
        Parameters:
        primitiveKeys - to use
        Returns:
        combinedKey