public boolean hasChild(StructuralSummaryNode newborn) { boolean present = false; // newborn exists in list or not for (StructuralSummaryNode child : childrenList) { if (child.getCID() == newborn.getCID() && (child.getQName() == null ? newborn.getQName() == null : child.getQName().equals(newborn.getQName()))) { present = true; break; } } return present; }
public void setParent(StructuralSummaryNode parent) { this.parent = parent; this.parentCID = parent.getCID(); this.levelComputed = false; }