/** * Cuts off all relationships this node has with siblings and parents. */ private void basicRemove() { if (parent_ != null && parent_.firstChild_ == this) { parent_.firstChild_ = nextSibling_; } else if (previousSibling_ != null && previousSibling_.nextSibling_ == this) { previousSibling_.nextSibling_ = nextSibling_; } if (nextSibling_ != null && nextSibling_.previousSibling_ == this) { nextSibling_.previousSibling_ = previousSibling_; } if (parent_ != null && this == parent_.getLastChild()) { parent_.firstChild_.previousSibling_ = previousSibling_; } nextSibling_ = null; previousSibling_ = null; parent_ = null; }
/** * Cuts off all relationships this node has with siblings and parents. */ private void basicRemove() { if (parent_ != null && parent_.firstChild_ == this) { parent_.firstChild_ = nextSibling_; } else if (previousSibling_ != null && previousSibling_.nextSibling_ == this) { previousSibling_.nextSibling_ = nextSibling_; } if (nextSibling_ != null && nextSibling_.previousSibling_ == this) { nextSibling_.previousSibling_ = previousSibling_; } if (parent_ != null && this == parent_.getLastChild()) { parent_.firstChild_.previousSibling_ = previousSibling_; } nextSibling_ = null; previousSibling_ = null; parent_ = null; }
/** * Cuts off all relationships this node has with siblings and parents. */ private void basicRemove() { if (parent_ != null && parent_.firstChild_ == this) { parent_.firstChild_ = nextSibling_; } else if (previousSibling_ != null && previousSibling_.nextSibling_ == this) { previousSibling_.nextSibling_ = nextSibling_; } if (nextSibling_ != null && nextSibling_.previousSibling_ == this) { nextSibling_.previousSibling_ = previousSibling_; } if (parent_ != null && this == parent_.getLastChild()) { parent_.firstChild_.previousSibling_ = previousSibling_; } nextSibling_ = null; previousSibling_ = null; parent_ = null; }
private static DomNode getChild(final DomNode node, final boolean lookLeft) { if (node == null) { return null; } final DomNode child; if (lookLeft) { child = node.getFirstChild(); } else { child = node.getLastChild(); } return child; }
/** * {@inheritDoc} */ @Override public DomNode lastChild() { final DomNode newNode = getEquivalentLogical(currentNode_.getLastChild(), true); if (newNode != null) { currentNode_ = newNode; } return newNode; }
/** * {@inheritDoc} */ @Override public DomNode lastChild() { final DomNode newNode = getEquivalentLogical(currentNode_.getLastChild(), true); if (newNode != null) { currentNode_ = newNode; } return newNode; }
private static DomNode getChild(final DomNode node, final boolean lookLeft) { if (node == null) { return null; } final DomNode child; if (lookLeft) { child = node.getFirstChild(); } else { child = node.getLastChild(); } return child; }
/** * Gets the JavaScript property "lastChild" for the node that * contains the current node. * @return the last child node or null if the current node has * no children. */ public Node jsxGet_lastChild() { return getJavaScriptNode(getDomNodeOrDie().getLastChild()); }
/** * Gets the JavaScript property "lastChild" for the node that * contains the current node. * @return the last child node or null if the current node has * no children. */ public Node jsxGet_lastChild() { return getJavaScriptNode(getDomNodeOrDie().getLastChild()); }
/** * Gets the JavaScript property "lastChild" for the node that * contains the current node. * @return the last child node or null if the current node has * no children. */ public Node jsxGet_lastChild() { return getJavaScriptNode(getDomNodeOrDie().getLastChild()); }
/** * Gets the JavaScript property "lastChild" for the node that * contains the current node. * @return the last child node or null if the current node has * no children. */ public Node jsxGet_lastChild() { return getJavaScriptNode(this.<DomNode>getDomNodeOrDie().getLastChild()); }
/** * Appends the specified node to the end of this node's children, assuming the specified * node is clean (doesn't have preexisting relationships to other nodes. * * @param node the node to append to this node's children */ private void basicAppend(final DomNode node) { node.setPage(getPage()); if (firstChild_ == null) { firstChild_ = node; firstChild_.previousSibling_ = node; } else { final DomNode last = getLastChild(); last.nextSibling_ = node; node.previousSibling_ = last; node.nextSibling_ = null; // safety first firstChild_.previousSibling_ = node; // new last node } node.parent_ = this; }
/** * Appends the specified node to the end of this node's children, assuming the specified * node is clean (doesn't have preexisting relationships to other nodes). * * @param node the node to append to this node's children */ private void basicAppend(final DomNode node) { node.setPage(getPage()); if (firstChild_ == null) { firstChild_ = node; firstChild_.previousSibling_ = node; } else { final DomNode last = getLastChild(); last.nextSibling_ = node; node.previousSibling_ = last; node.nextSibling_ = null; // safety first firstChild_.previousSibling_ = node; // new last node } node.parent_ = this; }
/** * Returns the last child node. * @return the last child node */ @JsxGetter public XMLDOMNode getLastChild() { final DomNode domNode = getDomNodeOrDie(); return getJavaScriptNode(domNode.getLastChild()); }
/** * Gets the JavaScript property {@code lastChild} for the node that * contains the current node. * @return the last child node or null if the current node has * no children. */ @JsxGetter public Node getLastChild() { return getJavaScriptNode(getDomNodeOrDie().getLastChild()); }
/** * Gets the JavaScript property {@code lastChild} for the node that * contains the current node. * @return the last child node or null if the current node has * no children. */ @JsxGetter public Node getLastChild() { return getJavaScriptNode(getDomNodeOrDie().getLastChild()); }
/** * Returns the last child node. * @return the last child node */ @JsxGetter public XMLDOMNode getLastChild() { final DomNode domNode = getDomNodeOrDie(); return getJavaScriptNode(domNode.getLastChild()); }
@Override protected DomNode getNextNode(final DomNode node) { if (node == null) { return null; } DomNode n = node.getLastChild(); if (n == null) { n = node.getPreviousSibling(); } if (n == null) { return getFirstNode(node.getParentNode()); } return n; } };
@Override protected DomNode getNextNode(final DomNode node) { if (node == null) { return null; } DomNode n = node.getLastChild(); if (n == null) { n = node.getPreviousSibling(); } if (n == null) { return getFirstNode(node.getParentNode()); } return n; } };
@Override protected DomNode getNextNode(final DomNode node) { if (node == null) { return null; } DomNode n = node.getLastChild(); if (n == null) { n = node.getPreviousSibling(); } if (n == null) { return getFirstNode(node.getParentNode()); } return n; } };