コード例 #1
0
 /**
  * Runs all commands that have been added to this command group in the order they have been added.
  * To understand how they are run, see the documentation of {@link
  * CommandGroup#addSequential(edu.ATA.command.Command) addSequential(Command)} and {@link
  * CommandGroup#addConcurrent(edu.ATA.command.Command) addConcurrent(Command)}.
  */
 public final void run() {
   Iterator i = commands.iterator();
   while (i.hasNext()) {
     Command c = (Command) i.next();
     c.run();
   }
 }
コード例 #2
0
ファイル: GordianStorage.java プロジェクト: Team4334/gordian
 public Object get(String name) throws InternalNotFoundException {
   Iterator i = list.iterator();
   while (i.hasNext()) {
     Node n = (Node) i.next();
     if (n.name.equals(name)) {
       return n.object;
     }
   }
   throw new InternalNotFoundException(name);
 }
コード例 #3
0
ファイル: GordianStorage.java プロジェクト: Team4334/gordian
 public boolean contains(String name) {
   Iterator i = list.iterator();
   while (i.hasNext()) {
     Node n = (Node) i.next();
     if (n.name.equals(name)) {
       return true;
     }
   }
   return false;
 }
コード例 #4
0
ファイル: GordianStorage.java プロジェクト: Team4334/gordian
 public void remove(String name) throws InternalNotFoundException {
   Iterator i = list.iterator();
   while (i.hasNext()) {
     Node n = (Node) i.next();
     if (n.name.equals(name)) {
       list.remove(n);
       return;
     }
   }
   throw new InternalNotFoundException(name);
 }
コード例 #5
0
ファイル: GordianStorage.java プロジェクト: Team4334/gordian
 public Object[] getAll(String name) {
   Iterator i = list.iterator();
   List l = new ArrayList();
   while (i.hasNext()) {
     Node n = (Node) i.next();
     if (n.name.equals(name)) {
       l.add(n.object);
     }
   }
   return l.toArray();
 }