org.geotools.util
Class HashCodeUtil

Object
  extended by HashCodeUtil

Deprecated. Use Utilities instead.

@Deprecated
public final class HashCodeUtil
extends Object

Collected methods which allow easy implementation of hashCode. Example use case:

  public int hashCode(){
    int result = HashCodeUtil.SEED;
    //collect the contributions of various fields
    result = HashCodeUtil.hash(result, fPrimitive);
    result = HashCodeUtil.hash(result, fObject);
    result = HashCodeUtil.hash(result, fArray);
    return result;
  }
 


Field Summary
static int SEED
          Deprecated. An initial value for a hashCode, to which is added contributions from fields.
 
Constructor Summary
HashCodeUtil()
          Deprecated.  
 
Method Summary
static int hash(boolean aBoolean)
          Deprecated.  
static int hash(char aChar)
          Deprecated.  
static int hash(double aDouble)
          Deprecated.  
static int hash(float aFloat)
          Deprecated.  
static int hash(int aInt)
          Deprecated.  
static int hash(int aSeed, boolean aBoolean)
          Deprecated. booleans.
static int hash(int aSeed, char aChar)
          Deprecated. chars.
static int hash(int aSeed, double aDouble)
          Deprecated. doubles.
static int hash(int aSeed, float aFloat)
          Deprecated. floats.
static int hash(int aSeed, int aInt)
          Deprecated. ints.
static int hash(int aSeed, long aLong)
          Deprecated. longs.
static int hash(int aSeed, Object aObject)
          Deprecated. aObject is a possibly-null object field, and possibly an array.
static int hash(long aLong)
          Deprecated.  
static int hash(Object aObject)
          Deprecated.  
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SEED

public static final int SEED
Deprecated. 
An initial value for a hashCode, to which is added contributions from fields. Using a non-zero value decreases collisons of hashCode values.

See Also:
Constant Field Values
Constructor Detail

HashCodeUtil

public HashCodeUtil()
Deprecated. 
Method Detail

hash

public static int hash(int aSeed,
                       boolean aBoolean)
Deprecated. 
booleans.


hash

public static int hash(boolean aBoolean)
Deprecated. 

hash

public static int hash(int aSeed,
                       char aChar)
Deprecated. 
chars.


hash

public static int hash(char aChar)
Deprecated. 

hash

public static int hash(int aSeed,
                       int aInt)
Deprecated. 
ints.


hash

public static int hash(int aInt)
Deprecated. 

hash

public static int hash(int aSeed,
                       long aLong)
Deprecated. 
longs.


hash

public static int hash(long aLong)
Deprecated. 

hash

public static int hash(int aSeed,
                       float aFloat)
Deprecated. 
floats.


hash

public static int hash(float aFloat)
Deprecated. 

hash

public static int hash(int aSeed,
                       double aDouble)
Deprecated. 
doubles.


hash

public static int hash(double aDouble)
Deprecated. 

hash

public static int hash(int aSeed,
                       Object aObject)
Deprecated. 
aObject is a possibly-null object field, and possibly an array. If aObject is an array, then each element may be a primitive or a possibly-null object.


hash

public static int hash(Object aObject)
Deprecated. 


Copyright © 1996-2009 Geotools. All Rights Reserved.