Package gnu.kawa.util

Interface BoundedHashable

    • Method Detail

      • boundedHash

        int boundedHash​(int seed,
                        int limit)
        Calculate a hash code for this object.
        Parameters:
        seed - The seed is an initial value, or the accumulated hash code from previous elements in a containing object. Using zero as the seed is fine.
        limit - A limit on the number of sub-elements whose hash we should calculate. This guards against cycles. Any recursive calls should be done with a smaller value of limit, and no recursive calls must be done when the limit is zero.
        Returns:
        A well-dispersed hash code. The result is not compatible with Object#hashCode.