public static int evenHash(final long value, final int mask)
    {
        int hash = (int)value ^ (int)(value >>> 32);
        hash = (hash << 1) - (hash << 8);

        return hash & mask;
    }
public static int evenHash ( final long value , final int mask ) { int hash = ( int ) value ^ ( int ) ( value > > > 32 ) ; hash = ( hash << 1 ) - ( hash << 8 ) ; return hash & mask ; }
Generate an even hash for a long value.

@param value to be hashed.
@param mask  mask to be applied that must be a power of 2 - 1.
@return the hash of the value which is always even.