gnu.trove.impl
Class HashFunctions

java.lang.Object
  extended by gnu.trove.impl.HashFunctions

public final class HashFunctions
extends java.lang.Object

Provides various hash functions.

Version:
1.0, 09/24/99
Author:
wolfgang.hoschek@cern.ch

Constructor Summary
HashFunctions()
           
 
Method Summary
static int fastCeil(float v)
          In profiling, it has been found to be faster to have our own local implementation of "ceil" rather than to call to Math.ceil(double).
static int hash(double value)
          Returns a hashcode for the specified value.
static int hash(float value)
          Returns a hashcode for the specified value.
static int hash(int value)
          Returns a hashcode for the specified value.
static int hash(long value)
          Returns a hashcode for the specified value.
static int hash(java.lang.Object object)
          Returns a hashcode for the specified object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HashFunctions

public HashFunctions()
Method Detail

hash

public static int hash(double value)
Returns a hashcode for the specified value.

Returns:
a hash code value for the specified value.

hash

public static int hash(float value)
Returns a hashcode for the specified value.

Returns:
a hash code value for the specified value.

hash

public static int hash(int value)
Returns a hashcode for the specified value.

Returns:
a hash code value for the specified value.

hash

public static int hash(long value)
Returns a hashcode for the specified value.

Returns:
a hash code value for the specified value.

hash

public static int hash(java.lang.Object object)
Returns a hashcode for the specified object.

Returns:
a hash code value for the specified object.

fastCeil

public static int fastCeil(float v)
In profiling, it has been found to be faster to have our own local implementation of "ceil" rather than to call to Math.ceil(double).



Copyright © 2007-2011 - Thomas Abeel - All Rights Reserved. SourceForge.netLogo