public void addTasks(@NotNull Collection<? extends ExternalTask> values) {
    tasks.ensureCapacity(tasks.size() + values.size());
    for (ExternalTask value : values) {
      if (value instanceof DefaultExternalTask) {
        tasks.add((DefaultExternalTask)value);
      }
      else {
        tasks.add(new DefaultExternalTask(value));
      }
    }
  }
public void addTasks(@NotNull Collection<? extends ExternalTask> values)