com.indeed.mph.EqualKeyValidator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mph-table Show documentation
Show all versions of mph-table Show documentation
Minimal Perfect Hash Tables
package com.indeed.mph;
/**
* @author alexs
*/
public class EqualKeyValidator implements KeyValidator {
private static final long serialVersionUID = 770186872;
public V validate(final K inputKey, final K extractedKey, final V extractedValue) {
// allow null for implicit keys
return extractedKey == null || inputKey.equals(extractedKey) ? extractedValue : null;
}
}