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
Constructor
Description
`LongHash()`

## Method Summary

Modifier and Type
Method
Description
`int`
`hashCode(Long o, int index, int seed)`
Calculate the hash of the given object.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### LongHash

public LongHash()

## Method Details

### hashCode

public int hashCode(Long o, int index, int seed)
Description copied from interface: `MinimalPerfectHash.UniversalHash`
Calculate the hash of the given object.

Specified by:
  `hashCode` in interface `MinimalPerfectHash.UniversalHash<Long>`
Parameters:
  `o` - the object
  `index` - 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