Java: Compare Two TreePath

Here is a method I created to compare two TreePath objects if they have the same set of paths from the leaf node up to the root. The code is pretty simple. I first check if they have the same number of path objects. If they do not, then it is considered as not equal. Second, if any of the node label text is not the same from the other, then the method returns false.

Related Posts Plugin for WordPress, Blogger...

Leave a Reply

Your email address will not be published. Required fields are marked *