ch.panter.li.bi.util
Class HashCodeTool

java.lang.Object
  extended by ch.panter.li.bi.util.HashCodeTool

public final class HashCodeTool
extends Object

Provides some utility methods for implementing common methods on general classes.


Method Summary
static int addHashCode(int hash, boolean obj)
          Adds the computed hash code of the given object to the given precomputed hash code according to the spec for lists.
static int addHashCode(int hash, byte obj)
          Adds the computed hash code of the given object to the given precomputed hash code according to the spec for lists.
static int addHashCode(int hash, char obj)
          Adds the computed hash code of the given object to the given precomputed hash code according to the spec for lists.
static int addHashCode(int hash, double obj)
          Adds the computed hash code of the given object to the given precomputed hash code according to the spec for lists.
static int addHashCode(int hash, float obj)
          Adds the computed hash code of the given object to the given precomputed hash code according to the spec for lists.
static int addHashCode(int hash, int obj)
          Adds the computed hash code of the given object to the given precomputed hash code according to the spec for lists.
static int addHashCode(int hash, long obj)
          Adds the computed hash code of the given object to the given precomputed hash code according to the spec for lists.
static int addHashCode(int hash, Object obj)
          Adds the computed hash code of the given object to the given precomputed hash code according to the spec for lists.
static int addHashCode(int hash, short obj)
          Adds the computed hash code of the given object to the given precomputed hash code according to the spec for lists.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

addHashCode

public static int addHashCode(int hash,
                              int obj)
Adds the computed hash code of the given object to the given precomputed hash code according to the spec for lists.

Parameters:
hash - the precomputed hash
obj - the object of which the hash should be added to the precomputed hash
Returns:
the precomputed hash added to the hash of the given object

addHashCode

public static int addHashCode(int hash,
                              boolean obj)
Adds the computed hash code of the given object to the given precomputed hash code according to the spec for lists.

Parameters:
hash - the precomputed hash
obj - the object of which the hash should be added to the precomputed hash
Returns:
the precomputed hash added to the hash of the given object

addHashCode

public static int addHashCode(int hash,
                              long obj)
Adds the computed hash code of the given object to the given precomputed hash code according to the spec for lists.

Parameters:
hash - the precomputed hash
obj - the object of which the hash should be added to the precomputed hash
Returns:
the precomputed hash added to the hash of the given object

addHashCode

public static int addHashCode(int hash,
                              double obj)
Adds the computed hash code of the given object to the given precomputed hash code according to the spec for lists.

Parameters:
hash - the precomputed hash
obj - the object of which the hash should be added to the precomputed hash
Returns:
the precomputed hash added to the hash of the given object

addHashCode

public static int addHashCode(int hash,
                              float obj)
Adds the computed hash code of the given object to the given precomputed hash code according to the spec for lists.

Parameters:
hash - the precomputed hash
obj - the object of which the hash should be added to the precomputed hash
Returns:
the precomputed hash added to the hash of the given object

addHashCode

public static int addHashCode(int hash,
                              short obj)
Adds the computed hash code of the given object to the given precomputed hash code according to the spec for lists.

Parameters:
hash - the precomputed hash
obj - the object of which the hash should be added to the precomputed hash
Returns:
the precomputed hash added to the hash of the given object

addHashCode

public static int addHashCode(int hash,
                              char obj)
Adds the computed hash code of the given object to the given precomputed hash code according to the spec for lists.

Parameters:
hash - the precomputed hash
obj - the object of which the hash should be added to the precomputed hash
Returns:
the precomputed hash added to the hash of the given object

addHashCode

public static int addHashCode(int hash,
                              byte obj)
Adds the computed hash code of the given object to the given precomputed hash code according to the spec for lists.

Parameters:
hash - the precomputed hash
obj - the object of which the hash should be added to the precomputed hash
Returns:
the precomputed hash added to the hash of the given object

addHashCode

public static int addHashCode(int hash,
                              Object obj)
Adds the computed hash code of the given object to the given precomputed hash code according to the spec for lists.

Parameters:
hash - the precomputed hash
obj - the object of which the hash should be added to the precomputed hash. may be null.
Returns:
the precomputed hash added to the hash of the given object


Copyright 2007-2007 SourceForge. All Rights Reserved.