Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Runtime

org.eclipse.gmf.runtime.common.core.util
Class HashUtil

java.lang.Object
  extended by 
org.eclipse.gmf.runtime.common.core.util.HashUtil

public final class HashUtil
extends java.lang.Object

A utility for generating unique hash values.


Field Summary
protected static int CONSTANT
          An arbitrary constant non-zero value.
protected static int PRIME
          An odd prime.
 
Method Summary
static int hash (boolean field)
          Retrieves a unique hash value for the specified field, based on a constant base value.
static int hash (byte field)
          Retrieves a unique hash value for the specified field, based on a constant base value.
static int hash (char field)
          Retrieves a unique hash value for the specified field, based on a constant base value.
static int hash (double field)
          Retrieves a unique hash value for the specified field, based on a constant base value.
static int hash (float field)
          Retrieves a unique hash value for the specified field, based on a constant base value.
static int hash (int field)
          Retrieves a unique hash value for the specified field, based on a constant base value.
static int hash (int base, boolean field)
          Retrieves a unique hash value for the specified field, based on the specified base value.
static int hash (int base, byte field)
          Retrieves a unique hash value for the specified field, based on the specified base value.
static int hash (int base, char field)
          Retrieves a unique hash value for the specified field, based on the specified base value.
static int hash (int base, double field)
          Retrieves a unique hash value for the specified field, based on the specified base value.
static int hash (int base, float field)
          Retrieves a unique hash value for the specified field, based on the specified base value.
static int hash (int base, int field)
          Retrieves a unique hash value for the specified field, based on the specified base value.
static int hash (int base, long field)
          Retrieves a unique hash value for the specified field, based on the specified base value.
static int hash (int base, java.lang.Object object)
          Retrieves a unique hash value for the specified object, based on the specified base value.
static int hash (int base, short field)
          Retrieves a unique hash value for the specified field, based on the specified base value.
static int hash (long field)
          Retrieves a unique hash value for the specified field, based on a constant base value.
static int hash (java.lang.Object object)
          Retrieves a unique hash value for the specified object, based on a constant base value.
static int hash (short field)
          Retrieves a unique hash value for the specified field, based on a constant base value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONSTANT

protected static final int CONSTANT
An arbitrary constant non-zero value.

See Also:
Constant Field Values

PRIME

protected static final int PRIME
An odd prime.

See Also:
Constant Field Values
Method Detail

hash

public static int hash(int base,
                       boolean field)
Retrieves a unique hash value for the specified field, based on the specified base value.

Parameters:
base - The value on which to base the hash value.
field - The field which to retrieve a hash value.
Returns:
A hash value for the specified field.

hash

public static int hash(boolean field)
Retrieves a unique hash value for the specified field, based on a constant base value.

Parameters:
field - The field which to retrieve a hash value.
Returns:
A hash value for the specified field.

hash

public static int hash(int base,
                       byte field)
Retrieves a unique hash value for the specified field, based on the specified base value.

Parameters:
base - The value on which to base the hash value.
field - The field which to retrieve a hash value.
Returns:
A hash value for the specified field.

hash

public static int hash(byte field)
Retrieves a unique hash value for the specified field, based on a constant base value.

Parameters:
field - The field which to retrieve a hash value.
Returns:
A hash value for the specified field.

hash

public static int hash(int base,
                       char field)
Retrieves a unique hash value for the specified field, based on the specified base value.

Parameters:
base - The value on which to base the hash value.
field - The field which to retrieve a hash value.
Returns:
A hash value for the specified field.

hash

public static int hash(char field)
Retrieves a unique hash value for the specified field, based on a constant base value.

Parameters:
field - The field which to retrieve a hash value.
Returns:
A hash value for the specified field.

hash

public static int hash(int base,
                       short field)
Retrieves a unique hash value for the specified field, based on the specified base value.

Parameters:
base - The value on which to base the hash value.
field - The field which to retrieve a hash value.
Returns:
A hash value for the specified field.

hash

public static int hash(short field)
Retrieves a unique hash value for the specified field, based on a constant base value.

Parameters:
field - The field which to retrieve a hash value.
Returns:
A hash value for the specified field.

hash

public static int hash(int base,
                       int field)
Retrieves a unique hash value for the specified field, based on the specified base value.

Parameters:
base - The value on which to base the hash value.
field - The field which to retrieve a hash value.
Returns:
A hash value for the specified field.

hash

public static int hash(int field)
Retrieves a unique hash value for the specified field, based on a constant base value.

Parameters:
field - The field which to retrieve a hash value.
Returns:
A hash value for the specified field.

hash

public static int hash(int base,
                       long field)
Retrieves a unique hash value for the specified field, based on the specified base value.

Parameters:
base - The value on which to base the hash value.
field - The field which to retrieve a hash value.
Returns:
A hash value for the specified field.

hash

public static int hash(long field)
Retrieves a unique hash value for the specified field, based on a constant base value.

Parameters:
field - The field which to retrieve a hash value.
Returns:
A hash value for the specified field.

hash

public static int hash(int base,
                       float field)
Retrieves a unique hash value for the specified field, based on the specified base value.

Parameters:
base - The value on which to base the hash value.
field - The field which to retrieve a hash value.
Returns:
A hash value for the specified field.

hash

public static int hash(float field)
Retrieves a unique hash value for the specified field, based on a constant base value.

Parameters:
field - The field which to retrieve a hash value.
Returns:
A hash value for the specified field.

hash

public static int hash(int base,
                       double field)
Retrieves a unique hash value for the specified field, based on the specified base value.

Parameters:
base - The value on which to base the hash value.
field - The field which to retrieve a hash value.
Returns:
A hash value for the specified field.

hash

public static int hash(double field)
Retrieves a unique hash value for the specified field, based on a constant base value.

Parameters:
field - The field which to retrieve a hash value.
Returns:
A hash value for the specified field.

hash

public static int hash(int base,
                       java.lang.Object object)
Retrieves a unique hash value for the specified object, based on the specified base value.

Parameters:
base - The value on which to base the hash value.
object - The object for which to retrieve a hash value.
Returns:
A hash value for the specified object.

hash

public static int hash(java.lang.Object object)
Retrieves a unique hash value for the specified object, based on a constant base value.

Parameters:
object - The object for which to retrieve a hash value.
Returns:
A hash value for the specified object.

Runtime

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire