|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectit.unimi.dsi.fastutil.HashCommon
public class HashCommon
Common code for all hash-based classes.
All hashing in fastutil
is performed starting from a 32-bit integer
associated to a key or value. For all integer types smaller than long
, we
just cast. In all other cases, we do some conversion using static code in this
class. Note that we follow the conventions established by the various classes
associated to primitive types (Boolean
, Double
, etc.).
Field Summary | |
---|---|
static Object |
REMOVED
This reference is used to fill keys and values of removed entries (if they are objects). |
Method Summary | |
---|---|
static int |
double2int(double d)
Returns the hash code that would be returned by Double.hashCode() . |
static int |
float2int(float f)
Returns the hash code that would be returned by Float.hashCode() . |
static int |
long2int(long l)
Returns the hash code that would be returned by Long.hashCode() . |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final Object REMOVED
null
cannot be used as it would confuse the
search algorithm in the presence of an actual null
key.
Method Detail |
---|
public static final int float2int(float f)
Float.hashCode()
.
new Float(f).hashCode()
.public static final int double2int(double d)
Double.hashCode()
.
new Double(f).hashCode()
.public static final int long2int(long l)
Long.hashCode()
.
new Long(f).hashCode()
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |