public void addChild(Object child) { if (child == null) { return; } if (child instanceof List) { addChildren((List) child); } else if (child instanceof ProxyTagNode) { children.add(((ProxyTagNode) child).getToken()); } else { children.add(child); if (child instanceof TagNode) { TagNode childTagNode = (TagNode) child; childTagNode.parent = this; } } }
public void addChild(Object child) { if (child == null) { return; } if (child instanceof List) { addChildren((List) child); } else if (child instanceof ProxyTagNode) { children.add(((ProxyTagNode) child).getToken()); } else if (child instanceof BaseToken) { children.add((BaseToken) child); if (child instanceof TagNode) { TagNode childTagNode = (TagNode) child; childTagNode.parent = this; } } else { throw new RuntimeException("Attempted to add invalid child object to TagNode; class=" + child.getClass()); } }
addPossibleHeadCandidate(tag, newTagNode, cleanTimeValues); if (tagNode != null) { tagNode.addChildren(itemsToMove); tagNode.addChild(newTagNode); it.set(null);
addPossibleHeadCandidate(tag, newTagNode, cleanTimeValues); if (tagNode != null) { tagNode.addChildren(itemsToMove); tagNode.addChild(newTagNode); it.set(null);