1 22 package fr.dyade.aaa.admin.script; 23 24 import java.lang.*; 25 import java.io.*; 26 import java.util.*; 27 import fr.dyade.aaa.admin.cmd.*; 28 import fr.dyade.aaa.agent.conf.*; 29 30 39 public class Script implements Serializable, Cloneable { 40 41 private Vector commands = null; 42 43 public boolean newConfig = false; 44 45 50 public Script() { 51 commands = new Vector(); 52 } 53 54 public void add(AdminCmd cmd) { 55 commands.addElement(cmd); 56 } 57 58 public boolean remove(AdminCmd cmd) { 59 return commands.removeElement(cmd); 60 } 61 62 public boolean contains(AdminCmd cmd) { 63 return commands.contains(cmd); 64 } 65 66 public boolean isEmpty() { 67 return commands.isEmpty(); 68 } 69 70 public Enumeration elements() { 71 return commands.elements(); 72 } 73 74 public int size() { 75 return commands.size(); 76 } 77 78 public Object elementAt(int i) 79 throws ArrayIndexOutOfBoundsException { 80 return commands.elementAt(i); 81 } 82 83 public Object firstElement() 84 throws NoSuchElementException { 85 return commands.firstElement(); 86 } 87 88 public String toString() { 89 return commands.toString(); 90 } 91 92 public Object clone() throws CloneNotSupportedException { 93 Script clone = (Script)super.clone(); 94 clone.commands = (Vector)commands.clone(); 95 clone.newConfig = newConfig; 96 return clone; 97 } 98 } 99 | Popular Tags |