Package org.goplanit.utils.misc
Class HashUtils
- java.lang.Object
-
- org.goplanit.utils.misc.HashUtils
-
public class HashUtils extends Object
Common location to provide some utilities for common hashing tasks- Author:
- markr
-
-
Constructor Summary
Constructors Constructor Description HashUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description 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.
-
-
-
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
-
-