示例#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);
   }
 }