Class HashCodeHelper


  • public class HashCodeHelper
    extends java.lang.Object
    A utility class to help calculate hashcode values using an algorithm similar to that outlined in "Effective Java, Joshua Bloch, 2nd Edition".
    • Constructor Summary

      Constructors 
      Constructor Description
      HashCodeHelper()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static int initHash()  
      static int updateHash​(int current, boolean var)  
      static int updateHash​(int current, boolean[] var)  
      static int updateHash​(int current, byte[] var)  
      static int updateHash​(int current, char var)  
      static int updateHash​(int current, char[] var)  
      static int updateHash​(int current, double var)  
      static int updateHash​(int current, double[] var)  
      static int updateHash​(int current, float var)  
      static int updateHash​(int current, float[] var)  
      static int updateHash​(int current, int var)  
      static int updateHash​(int current, int[] var)  
      static int updateHash​(int current, long var)  
      static int updateHash​(int current, long[] var)  
      static int updateHash​(int current, short[] var)  
      static int updateHash​(int current, java.lang.Character var)  
      static int updateHash​(int current, java.lang.Double var)  
      static int updateHash​(int current, java.lang.Float var)  
      static int updateHash​(int current, java.lang.Integer var)  
      static int updateHash​(int current, java.lang.Long var)  
      static int updateHash​(int current, java.lang.Object var)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • HashCodeHelper

        public HashCodeHelper()
    • Method Detail

      • initHash

        public static int initHash()
      • updateHash

        public static int updateHash​(int current,
                                     boolean var)
      • updateHash

        public static int updateHash​(int current,
                                     char var)
      • updateHash

        public static int updateHash​(int current,
                                     java.lang.Character var)
      • updateHash

        public static int updateHash​(int current,
                                     int var)
      • updateHash

        public static int updateHash​(int current,
                                     java.lang.Integer var)
      • updateHash

        public static int updateHash​(int current,
                                     long var)
      • updateHash

        public static int updateHash​(int current,
                                     java.lang.Long var)
      • updateHash

        public static int updateHash​(int current,
                                     float var)
      • updateHash

        public static int updateHash​(int current,
                                     java.lang.Float var)
      • updateHash

        public static int updateHash​(int current,
                                     double var)
      • updateHash

        public static int updateHash​(int current,
                                     java.lang.Double var)
      • updateHash

        public static int updateHash​(int current,
                                     java.lang.Object var)
      • updateHash

        public static int updateHash​(int current,
                                     boolean[] var)
      • updateHash

        public static int updateHash​(int current,
                                     char[] var)
      • updateHash

        public static int updateHash​(int current,
                                     byte[] var)
      • updateHash

        public static int updateHash​(int current,
                                     short[] var)
      • updateHash

        public static int updateHash​(int current,
                                     int[] var)
      • updateHash

        public static int updateHash​(int current,
                                     long[] var)
      • updateHash

        public static int updateHash​(int current,
                                     float[] var)
      • updateHash

        public static int updateHash​(int current,
                                     double[] var)