akka.util
Class HashCode

java.lang.Object
  extended by akka.util.HashCode

public class HashCode
extends java.lang.Object

Set of methods which allow easy implementation of hashCode.

Example:

  override def hashCode: Int = {
    var result = HashCode.SEED
    //collect the contributions of various fields
    result = HashCode.hash(result, fPrimitive)
    result = HashCode.hash(result, fObject)
    result = HashCode.hash(result, fArray)
    result
  }
 


Constructor Summary
HashCode()
           
 
Method Summary
static int hash(int seed, boolean value)
           
static int hash(int seed, char value)
           
static int hash(int seed, double value)
           
static int hash(int seed, float value)
           
static int hash(int seed, int value)
           
static int hash(int seed, long value)
           
static int hash(int seed, java.lang.Object any)
           
static int SEED()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HashCode

public HashCode()
Method Detail

SEED

public static int SEED()

hash

public static int hash(int seed,
                       java.lang.Object any)

hash

public static int hash(int seed,
                       boolean value)

hash

public static int hash(int seed,
                       char value)

hash

public static int hash(int seed,
                       int value)

hash

public static int hash(int seed,
                       long value)

hash

public static int hash(int seed,
                       float value)

hash

public static int hash(int seed,
                       double value)