code: public void addTaskStates(Collection<TaskState> taskStates) {
      for (TaskState taskState : taskStates) {
        this.taskStates.put(taskState.getTaskId(), taskState);
      }
    }
docs: Add a collection of {@link TaskState}s.
  
  @param taskStates collection of {@link TaskState}s to add