Exemple #1
0
  /* Devolve lista com o tipo de tarefas */
  public List<String> listTask() {
    ArrayList<String> tasklist = new ArrayList<>();

    lock.lock();
    try {
      for (Task task : this.tasks.values()) {
        tasklist.add(task.getType());
      }
      return tasklist;
    } finally {
      lock.unlock();
    }
  }