boolean (@NotNull NodeDescriptor<?> eachNode) { NodeDescriptor<?> eachParent = eachNode.getParentDescriptor(); while (eachParent != null) { if (eachParent == this) return true; eachParent = eachParent.getParentDescriptor(); } return false; }