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