Exemple #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);
 }
Exemple #2
0
 public List<Command> getCommands() {
   synchronized (commands) {
     return Collections.unmodifiableList(commands);
   }
 }