Ejemplo n.º 1
0
 public synchronized void setTasks(List<Class<? extends Task>> tasks) {
   if (locked) throw new UnsupportedOperationException();
   if (tasks == null) throw new NullPointerException();
   this.tasks = Collections.unmodifiableList(tasks);
 }
Ejemplo n.º 2
0
 public List<Command> getCommands() {
   synchronized (commands) {
     return Collections.unmodifiableList(commands);
   }
 }