Here you can find the source of hash(long key)
Parameter | Description |
---|---|
key | to be hashed |
static long hash(long key)
//package com.java2s; /*// www .j a va 2 s . com * Copyright 2016, Yahoo! Inc. * Licensed under the terms of the Apache License 2.0. See LICENSE file at the project root for terms. */ public class Main { /** * @param key to be hashed * @return an index into the hash table This hash function is taken from the internals of * Austin Appleby's MurmurHash3 algorithm. It is also used by the Trove for Java libraries. */ static long hash(long key) { key ^= key >>> 33; key *= 0xff51afd7ed558ccdL; key ^= key >>> 33; key *= 0xc4ceb9fe1a85ec53L; key ^= key >>> 33; return key; } }