How to properly define hash function for a list of objects?
Posted
by AnSGri
on Stack Overflow
See other posts from Stack Overflow
or by AnSGri
Published on 2010-06-16T14:55:29Z
Indexed on
2010/06/16
15:02 UTC
Read the original article
Hit count: 175
I have a data structure containing a list of objects, like this:
class A {
private List<Object> list;
}
How to properly define a hash function for the list, assuming each element of the list has correct hashCode()
?
(It's strange that I couldn't easily find the solution via Google.)
© Stack Overflow or respective owner