1 9 10 package org.jboss.portal.common.command; 11 12 import java.util.Iterator ; 13 import java.util.LinkedList ; 14 15 import org.jboss.portal.common.command.result.Result; 16 17 21 public class CompositeCommand 22 implements Command 23 { 24 25 private final LinkedList list = new LinkedList (); 26 27 public void add(Command cmd) 28 { 29 list.add(cmd); 30 } 31 32 public Configurator getConfigurator() 33 { 34 return EmptyConfigurator.EMPTY_CONFIGURATOR; 35 } 36 37 public Iterator iterator() 38 { 39 return list.iterator(); 40 } 41 42 public Result execute() 43 { 44 throw new RuntimeException ("Cannot be executed directly"); 45 } 46 } 47 | Popular Tags |