/** * Checks if this node can be replaced by another node: tree structure & type. */ public final boolean isSafelyReplaceableBy(Node newNode) { return NodeUtil.isReplacementSafe(getParent(), this, newNode); }
/** * Checks if this node can be replaced by another node: tree structure & type. * * @since 0.8 or earlier */ public final boolean isSafelyReplaceableBy(Node newNode) { return NodeUtil.isReplacementSafe(getParent(), this, newNode); }
/** * Checks if this node can be replaced by another node: tree structure & type. * * @since 0.8 or earlier */ public final boolean isSafelyReplaceableBy(Node newNode) { return NodeUtil.isReplacementSafe(getParent(), this, newNode); }
if (!NodeUtil.isReplacementSafe(parent, node, wrapperNode)) { throw new IllegalStateException( String.format("WrapperNode implementation %s cannot be safely replaced in parent node class %s.", wrapperNode.getClass().getName(), parent.getClass().getName()));
if (!NodeUtil.isReplacementSafe(parent, node, wrapperNode)) { throw new IllegalStateException( String.format("WrapperNode implementation %s cannot be safely replaced in parent node class %s.", wrapperNode.getClass().getName(), parent.getClass().getName()));