1 package com.sri.emo.dbobj.model_tree; 2 3 import java.util.Iterator; 4 5 /*** 6 * A node in the model tree that can have its children modified 7 * 8 * @author Michael Rimov 9 */ 10 public interface MutableModelNode extends ModelNode { 11 12 /*** 13 * Add a child node to the given mutable model. 14 * 15 * @param newNode ModelCompositeNode 16 */ 17 void addChild(ModelNode newNode); 18 19 /*** 20 * Allows for iteration of the contents of the node, possibly removing 21 * them if the iterator supports removal. (Default case is iterating 22 * an ArrayList which is possible) 23 * 24 * @return Iterator that returns MutableModelNode instances. 25 */ 26 Iterator iterator(); 27 28 }