> Set#hashCode is specified as "the sum of the hash codes of the element".
Yes, I know. There's only one call to Set.hashCode() in the code base (and that is in a test). So we won't need such a method. If people did ever need to hash sets we'd encourage them to hash a deterministically ordered (e.g. sorted) list view of the set. On Fri, Jul 17, 2020 at 12:31 PM Vladimir Sitnikov <[email protected]> wrote: > > >Hashes > > Ok > > >I would imagine that there would be various functions > >static int hash(Object v0, int v1) > > I was not planning to add `int` overloads. At least, I don't want to add > 2^N overloads like (Object, int, int, Object). > I'll check if (Object, Object, Object) is enough. > I hope that escape analysis eliminates boxing. > > >And maybe there is also a set of functions that return results consistent > with new HashSet > > Set#hashCode is specified as "the sum of the hash codes of the element". > > Vladimir
