Package org.jfree.chart
Class HashUtils
java.lang.Object
org.jfree.chart.HashUtils
Some utility methods for calculating hash codes.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic 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 intReturns a hash value based on a seed value and a paint instance.static intReturns a hash value based on a seed value and a stroke instance.static inthashCode(int pre, Comparable c) Returns a hash value based on a seed value and aComparableinstance.static intReturns a hash value based on a seed value and anObjectinstance.static intReturns 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 intComputes 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 intReturns a hash code for aPaintinstance.
-
Constructor Details
-
HashUtils
public HashUtils()
-
-
Method Details
-
hashCodeForPaint
Returns a hash code for aPaintinstance. Ifpisnull, this method returns zero.- Parameters:
p- the paint (nullpermitted).- Returns:
- The hash code.
-
hashCodeForDoubleArray
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
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
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
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
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
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
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
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
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
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
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
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.
-