Package org.jfree.chart
Class HashUtils
- java.lang.Object
-
- org.jfree.chart.HashUtils
-
public class HashUtils extends java.lang.ObjectSome utility methods for calculating hash codes.
-
-
Constructor Summary
Constructors Constructor Description HashUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static inthashCode(int pre, boolean b)Returns a hash value based on a seed value and the value of a boolean primitive.static inthashCode(int pre, double d)Returns a hash value based on a seed value and the value of a double primitive.static inthashCode(int pre, int i)Returns a hash value based on a seed value and the value of an int primitive.static inthashCode(int pre, java.awt.Paint p)Returns a hash value based on a seed value and a paint instance.static inthashCode(int pre, java.awt.Stroke s)Returns a hash value based on a seed value and a stroke instance.static inthashCode(int pre, java.lang.Comparable c)Returns a hash value based on a seed value and aComparableinstance.static inthashCode(int pre, java.lang.Object obj)Returns a hash value based on a seed value and anObjectinstance.static inthashCode(int pre, java.lang.String s)Returns a hash value based on a seed value and a string instance.static inthashCode(int pre, BooleanList list)Computes a hash code for aBooleanList.static inthashCode(int pre, PaintList list)Computes a hash code for aPaintList.static inthashCode(int pre, StrokeList list)Computes a hash code for aStrokeList.static inthashCodeForDoubleArray(double[] a)Returns a hash code for adouble[]instance.static inthashCodeForPaint(java.awt.Paint p)Returns a hash code for aPaintinstance.
-
-
-
Method Detail
-
hashCodeForPaint
public static int hashCodeForPaint(java.awt.Paint p)
Returns a hash code for aPaintinstance. Ifpisnull, this method returns zero.- Parameters:
p- the paint (nullpermitted).- Returns:
- The hash code.
-
hashCodeForDoubleArray
public static int hashCodeForDoubleArray(double[] a)
Returns a hash code for adouble[]instance. If the array isnull, this method returns zero.- Parameters:
a- the array (nullpermitted).- Returns:
- The hash code.
-
hashCode
public static int hashCode(int pre, boolean b)Returns a hash value based on a seed value and the value of a boolean primitive.- Parameters:
pre- the seed value.b- the boolean value.- Returns:
- A hash value.
-
hashCode
public static int hashCode(int pre, int i)Returns a hash value based on a seed value and the value of an int primitive.- Parameters:
pre- the seed value.i- the int value.- Returns:
- A hash value.
-
hashCode
public static int hashCode(int pre, double d)Returns a hash value based on a seed value and the value of a double primitive.- Parameters:
pre- the seed value.d- the double value.- Returns:
- A hash value.
-
hashCode
public static int hashCode(int pre, java.awt.Paint p)Returns a hash value based on a seed value and a paint instance.- Parameters:
pre- the seed value.p- the paint (nullpermitted).- Returns:
- A hash value.
-
hashCode
public static int hashCode(int pre, java.awt.Stroke s)Returns a hash value based on a seed value and a stroke instance.- Parameters:
pre- the seed value.s- the stroke (nullpermitted).- Returns:
- A hash value.
-
hashCode
public static int hashCode(int pre, java.lang.String s)Returns a hash value based on a seed value and a string instance.- Parameters:
pre- the seed value.s- the string (nullpermitted).- Returns:
- A hash value.
-
hashCode
public static int hashCode(int pre, java.lang.Comparable c)Returns a hash value based on a seed value and aComparableinstance.- Parameters:
pre- the seed value.c- the comparable (nullpermitted).- Returns:
- A hash value.
-
hashCode
public static int hashCode(int pre, java.lang.Object obj)Returns a hash value based on a seed value and anObjectinstance.- Parameters:
pre- the seed value.obj- the object (nullpermitted).- Returns:
- A hash value.
-
hashCode
public static int hashCode(int pre, BooleanList list)Computes a hash code for aBooleanList. In the latest version of JCommon, theBooleanListclass should implement the hashCode() method correctly, but we compute it here anyway so that we can work with older versions of JCommon (back to 1.0.0).- Parameters:
pre- the seed value.list- the list (nullpermitted).- Returns:
- The hash code.
-
hashCode
public static int hashCode(int pre, PaintList list)Computes a hash code for aPaintList. In the latest version of JCommon, thePaintListclass should implement the hashCode() method correctly, but we compute it here anyway so that we can work with older versions of JCommon (back to 1.0.0).- Parameters:
pre- the seed value.list- the list (nullpermitted).- Returns:
- The hash code.
-
hashCode
public static int hashCode(int pre, StrokeList list)Computes a hash code for aStrokeList. In the latest version of JCommon, theStrokeListclass should implement the hashCode() method correctly, but we compute it here anyway so that we can work with older versions of JCommon (back to 1.0.0).- Parameters:
pre- the seed value.list- the list (nullpermitted).- Returns:
- The hash code.
-
-