default boolean allParentsMatch(@Nonnull PathNode<?> other) {
		// Type identifiers should match for all levels.
		if (!typeId().equals(other.typeId()))
			return false;

		// Should both have the same level of tree heights (number of parents).
		PathNode<?> parent = getParent();
		PathNode<?> otherParent = other.getParent();
		if (parent == null && otherParent == null)
			// Root node edge case
			return hasEqualOrChildValue(other);
		else if (parent == null || otherParent == null)
			// Mismatch in tree structure height
			return false;

		// Go up the chain if the matching values continue.
		if (hasEqualOrChildValue(other))
			return parent.allParentsMatch(otherParent);
		return false;
	}
Checks for tree alignment. Consider this simple example:
<pre>
  Path1   Path2   Path3
    A       A       A
    |       |       |
    B       B       B
    |       |       |
    C       C       X
</pre>
With this setup:
<ul>
    <li>{@code path1C.allParentsMatch(path1C) == true} Self checks are equal</li>
    <li>{@code path1C.allParentsMatch(path2C) == true} Two identical paths <i>(by value of each node)</i> are equal</li>
    <li>{@code path1C.allParentsMatch(path2B) == false} Comparing between non-parallel levels are not equal</li>
    <li>{@code path1C.allParentsMatch(path3X) == false} Paths to different items are not equal</li>
</ul>

@param other
		Some other path node.

@return {@code true} when from this level all parents going up the path match values.
recaf-core/src/main/java/software/coley/recaf/path/PathNode.java