/** * Visits this node and all its sub nodes. * * @param visitor the visitor */ public void visit(ConfigurationNodeVisitor visitor) { if (visitor == null) { throw new IllegalArgumentException("Visitor must not be null!"); } if (!visitor.terminate()) { visitor.visitBeforeChildren(this); children.visit(visitor); attributes.visit(visitor); visitor.visitAfterChildren(this); } }
/** * Let the passed in visitor visit all sub nodes. * * @param visitor the visitor */ public void visit(ConfigurationNodeVisitor visitor) { if (nodes != null) { for (Iterator<ConfigurationNode> it = nodes.iterator(); it.hasNext() && !visitor.terminate();) { it.next().visit(visitor); } } }
/** * Let the passed in visitor visit all sub nodes. * * @param visitor the visitor */ public void visit(ConfigurationNodeVisitor visitor) { if (nodes != null) { for (Iterator<ConfigurationNode> it = nodes.iterator(); it.hasNext() && !visitor.terminate();) { it.next().visit(visitor); } } }
/** * Visits this node and all its sub nodes. * * @param visitor the visitor */ public void visit(ConfigurationNodeVisitor visitor) { if (visitor == null) { throw new IllegalArgumentException("Visitor must not be null!"); } if (!visitor.terminate()) { visitor.visitBeforeChildren(this); children.visit(visitor); attributes.visit(visitor); visitor.visitAfterChildren(this); } }