Package org.h2.dev.hash
Class MinimalPerfectHash.LongHash
java.lang.Object
org.h2.dev.hash.MinimalPerfectHash.LongHash
- All Implemented Interfaces:
MinimalPerfectHash.UniversalHash<Long>
- Enclosing class:
- MinimalPerfectHash<K>
public static class MinimalPerfectHash.LongHash
extends Object
implements MinimalPerfectHash.UniversalHash<Long>
A sample hash implementation for long keys.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
LongHash
public LongHash()
-
-
Method Details
-
hashCode
Description copied from interface:MinimalPerfectHash.UniversalHashCalculate the hash of the given object.- Specified by:
hashCodein interfaceMinimalPerfectHash.UniversalHash<Long>- Parameters:
o- the objectindex- the hash function index (index 0 is used first, so the method should be very fast with index 0; index 1 and so on are only called when really needed)seed- the random seed (always the same for a hash table)- Returns:
- the hash value
-