]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.db.testing/src/org/simantics/db/testing/base/CommandListImpl.java
Added missing org.simantics.db.{tests,testing} plug-ins.
[simantics/platform.git] / bundles / org.simantics.db.testing / src / org / simantics / db / testing / base / CommandListImpl.java
1 package org.simantics.db.testing.base;
2
3 import java.util.ArrayList;
4
5 import org.simantics.db.testing.common.Command;
6
7 public class CommandListImpl implements CommandList {
8         
9         public ArrayList<Command> commands = new ArrayList<Command>();
10
11         @Override
12         public <T extends Command> T add(T command) {
13                 commands.add(command);
14                 return command;
15         }
16         
17         public Command[] toArray() {
18                 return commands.toArray(new Command[commands.size()]);
19         }
20         
21 }