Class HashCodeBuilder<T>

    • Constructor Detail

      • HashCodeBuilder

        public HashCodeBuilder()
        Create a new instance, with internal hash initialized to 1, equivalent of HashCodeBuilder(1).
      • HashCodeBuilder

        public HashCodeBuilder​(int seedHash)
        Create a new instance, with internal hash set to specified seed.
        Parameters:
        seedHash - Seed hash value
    • Method Detail

      • nextHashCode

        public static int nextHashCode​(int hashCode,
                                       Object obj)
        Determine the next hash code combining a base hash code and the hash code of an object.
        Parameters:
        hashCode - base hash code
        obj - Object to be added
        Returns:
        Combined hash code
      • addArgument

        public void addArgument​(T obj)
        Update the internal hash code with the hash code of a component object.
        Parameters:
        obj - Component object