class Tasks implements BaseService {

    public void removeType(@NonNull TaskType taskType) {
        Exceptions.log("Tasks remove type type " + taskType);
        synchronized (pending) {
            final ListIterator<Task> it = pending.listIterator();
            while (it.hasNext()) {
                final Task task = it.next();
                if (!task.equals(running) && task.taskType().name().equals(taskType.name())) {
                    it.remove();
                }
            }
        }
    }

}