Re: [jgrapht-users] Bug help
Brought to you by:
barak_naveh,
perfecthash
From: John S. <js...@gm...> - 2016-10-24 19:43:33
|
Since you are overriding equals/hashCode, you are opting for object value semantics rather than object identity semantics. As a result, there can be multiple equivalent objects floating around for the same vertex. This doesn't play well together with having additional data (such as the children array) hanging off of those objects. So to fix your bug, you have two options: a) remove both equals and hashCode to make sure your vertex objects are unique or b) use a String for your vertex type, and keep a separate map from String to Node |