com.ijchart.xychart.util
Class HashcodeUtil

java.lang.Object
  extended by com.ijchart.xychart.util.HashcodeUtil

public final class HashcodeUtil
extends java.lang.Object

Title: IJChart

Description: a chart library for the Java(tm) platform.

A util class for calculate the hashcode of a object.

Copyright: Copyright (c) 2013

Company:

Version:
1.0
Author:
zhang feng min,shanghai china. Contract me by email.

Method Summary
static int hashCode(boolean b)
           Returns a hashcode for a boolean value,true 1 otherwise 0.
static int hashCode(java.awt.Image image)
           Returns a hashcode for an image,if the image is null return 0 otherwise return image.width*image.height.
static int hashCode(java.lang.Object object)
           Returns a hash code for an object, or zero if the object is null.
static int hashCode(java.lang.Object[] object)
           Returns a hash code for an array, or zero if the object is null.
static int hashCode(java.awt.Paint paint)
           Returns a hash code for a Paint instance.If p is null, this method returns zero.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

hashCode

public static int hashCode(java.lang.Object object)
Returns a hash code for an object, or zero if the object is null.

Parameters:
object - Object The object (null permitted).
Returns:
The object's hash code (or zero if the object is null).

hashCode

public static int hashCode(java.lang.Object[] object)
Returns a hash code for an array, or zero if the object is null.

Parameters:
object - Object The object (null permitted).
Returns:
The object's hash code (or zero if the object is null).

hashCode

public static int hashCode(java.awt.Image image)
Returns a hashcode for an image,if the image is null return 0 otherwise return image.width*image.height.

Parameters:
image - Image The Image object.
Returns:
A hashcode.If the image is null return 0 otherwise return image.width*image.height.

hashCode

public static int hashCode(boolean b)
Returns a hashcode for a boolean value,true 1 otherwise 0.

Parameters:
b - boolean The boolean value.
Returns:
A hashcode.If b is true return 1,otherwise return 0.

hashCode

public static int hashCode(java.awt.Paint paint)
Returns a hash code for a Paint instance.If p is null, this method returns zero.

Parameters:
paint - Paint The paint (null permitted).
Returns:
int The hash code.