Java Long to Int longToIntHashCode(long value)

Here you can find the source of longToIntHashCode(long value)

Description

Converts long value to int hash code.

License

Open Source License

Parameter

Parameter Description
value long value

Return

int hash code for the long

Declaration

public static int longToIntHashCode(long value) 

Method Source Code

//package com.java2s;
/**//from   w ww.  j  a v a 2s  .com
 * Copyright (c) 2014-2015 by Wen Yu.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 * 
 * Any modifications to this file must keep this entire header intact.
 */

public class Main {
    /**
     * Converts long value to int hash code.
     * 
     * @param value long value
     * @return int hash code for the long
     */
    public static int longToIntHashCode(long value) {
        return Long.valueOf(value).hashCode();
    }
}

Related

  1. longToIntBounds(long value)
  2. longToIntBytes(long a)
  3. longToIntClip(final long value)
  4. longToInteger(final long value)
  5. longToInteger(long l)
  6. longToInts(long n)