]> gerrit.simantics Code Review - simantics/platform.git/blob - CommandListImpl.java
d246339560a045f45f0bf2a63aedde7854d2f2a9
[simantics/platform.git] / 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 }