This week's book giveaway is in the Performance forum. We're giving away four copies of The Java Performance Companion and have Charlie Hunt, Monica Beckwith, Poonam Parhar, & Bengt Rutisson on-line! See this thread for details.
isNodeAncestor keeps returning false even though the value I pass in is an an ancestor node... here is what i am doing:
1. read a key from a HashMap and create a new node 2. before adding the new node (child) to the current node (node), I want to make sure that it is not an ancestor (parent or grandparent, etc..) of the current node. To do this I call:
But if always returns false.. my guess is that it is because the child node, even though it may be the same as an ancestor, is not the actual ancestor node.