boolean (ChangesBrowserNode<?> parent, ChangesBrowserNode<?> node) { ChangesBrowserNode<?> nodeParent = node.getParent(); while (nodeParent != null) { if (nodeParent == parent) return true; nodeParent = nodeParent.getParent(); } return false; }