public void setProcessingInstructions(List<ProcessingInstruction> listOfPIs) { for (ProcessingInstruction pi : listOfPIs) { addNode(pi); } }
public void add(ProcessingInstruction pi) { addNode(pi); }
public void add(Element element) { addNode(element); }
public void add(Comment comment) { addNode(comment); }
@Override public boolean add(T node) { branch.addNode(node); return super.add(node); }
@Override public void add(int index, T node) { int size = size(); if (index < 0) { throw new IndexOutOfBoundsException("Index value: " + index + " is less than zero"); } else if (index > size) { throw new IndexOutOfBoundsException("Index value: " + index + " cannot be greater than " + "the size: " + size); } int realIndex; if (size == 0) { realIndex = branchContent.size(); } else if (index < size) { realIndex = branchContent.indexOf(get(index)); } else { realIndex = branchContent.indexOf(get(size - 1)) + 1; } branch.addNode(realIndex, node); super.add(index, node); }
@Override public T set(int index, T node) { int realIndex = branchContent.indexOf(get(index)); if (realIndex < 0) { realIndex = (index == 0) ? 0 : Integer.MAX_VALUE; } if (realIndex < branchContent.size()) { branch.removeNode(get(index)); branch.addNode(realIndex, node); } else { branch.removeNode(get(index)); branch.addNode(node); } branch.childAdded(node); return super.set(index, node); }
public void setProcessingInstructions(List<ProcessingInstruction> listOfPIs) { for (ProcessingInstruction pi : listOfPIs) { addNode(pi); } }
public void add(Comment comment) { addNode(comment); }
public void add(ProcessingInstruction pi) { addNode(pi); }
public void add(Comment comment) { addNode(comment); }
@Override public boolean add(T node) { branch.addNode(node); return super.add(node); }
@Override public boolean add(T node) { branch.addNode(node); return super.add(node); }
public void setProcessingInstructions(List listOfPIs) { for (Iterator iter = listOfPIs.iterator(); iter.hasNext();) { ProcessingInstruction pi = (ProcessingInstruction) iter.next(); addNode(pi); } }
public void setProcessingInstructions(List listOfPIs) { for (Iterator iter = listOfPIs.iterator(); iter.hasNext();) { ProcessingInstruction pi = (ProcessingInstruction) iter.next(); addNode(pi); } }
public void setProcessingInstructions(List listOfPIs) { for (Iterator iter = listOfPIs.iterator(); iter.hasNext();) { ProcessingInstruction pi = (ProcessingInstruction) iter.next(); addNode(pi); } }
public void setProcessingInstructions(List listOfPIs) { for (Iterator iter = listOfPIs.iterator(); iter.hasNext();) { ProcessingInstruction pi = (ProcessingInstruction) iter.next(); addNode(pi); } }
public void setProcessingInstructions(List listOfPIs) { for (Iterator iter = listOfPIs.iterator(); iter.hasNext();) { ProcessingInstruction pi = (ProcessingInstruction) iter.next(); addNode(pi); } }
public void setProcessingInstructions(List listOfPIs) { for (Iterator iter = listOfPIs.iterator(); iter.hasNext();) { ProcessingInstruction pi = (ProcessingInstruction) iter.next(); addNode(pi); } }
public boolean add(Object object) { branch.addNode(asNode(object)); return super.add(object); }