<commit_before>package seedu.address.model;

import java.util.Collection;
import java.util.List;
import java.util.Objects;

import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import seedu.address.model.task.DeadlineTask;
import seedu.address.model.task.EventTask;
import seedu.address.model.task.FloatingTask;
import seedu.address.model.task.Task;
import seedu.address.model.task.TaskNotFoundException;

/**
 * Wraps all data at the address-book level
 * Duplicates are not allowed (by .equals comparison)
 */
public class TaskBook implements ReadOnlyTaskBook {

    private final ObservableList<Task> tasks;

    private final ObservableList<FloatingTask> floatingTasks;

    private final ObservableList<EventTask> eventTasks;

    private final ObservableList<DeadlineTask> deadlineTasks;

    public TaskBook() {
        tasks = FXCollections.observableArrayList();
        floatingTasks = FXCollections.observableArrayList();
        eventTasks = FXCollections.observableArrayList();
        deadlineTasks = FXCollections.observableArrayList();
    }

    /**
     * Tasks are copied into this TaskBook.
     */
    public TaskBook(ReadOnlyTaskBook toBeCopied) {
        this(toBeCopied.getTasks(),
             toBeCopied.getFloatingTasks(),
             toBeCopied.getEventTasks(),
             toBeCopied.getDeadlineTasks());
    }

    /**
     * Tasks are copied into this TaskBook.
     */
    public TaskBook(List<Task> tasks, List<FloatingTask> floatingTasks,
                    List<EventTask> eventTasks, List<DeadlineTask> deadlineTasks) {
        this();
        setTasks(tasks);
        setFloatingTasks(floatingTasks);
        setEventTasks(eventTasks);
        setDeadlineTasks(deadlineTasks);
    }

    public void resetData(ReadOnlyTaskBook newData) {
        setTasks(newData.getTasks());
    }

    //// task operations<commit_msg>TaskBook::resetData(): replace floating/event/deadline task data as well<commit_after>package seedu.address.model;

import java.util.Collection;
import java.util.List;
import java.util.Objects;

import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import seedu.address.model.task.DeadlineTask;
import seedu.address.model.task.EventTask;
import seedu.address.model.task.FloatingTask;
import seedu.address.model.task.Task;
import seedu.address.model.task.TaskNotFoundException;

/**
 * Wraps all data at the address-book level
 * Duplicates are not allowed (by .equals comparison)
 */
public class TaskBook implements ReadOnlyTaskBook {

    private final ObservableList<Task> tasks;

    private final ObservableList<FloatingTask> floatingTasks;

    private final ObservableList<EventTask> eventTasks;

    private final ObservableList<DeadlineTask> deadlineTasks;

    public TaskBook() {
        tasks = FXCollections.observableArrayList();
        floatingTasks = FXCollections.observableArrayList();
        eventTasks = FXCollections.observableArrayList();
        deadlineTasks = FXCollections.observableArrayList();
    }

    /**
     * Tasks are copied into this TaskBook.
     */
    public TaskBook(ReadOnlyTaskBook toBeCopied) {
        this();
        resetData(toBeCopied);
    }

    /**
     * Replaces the contents of this TaskBook with {@code newData}.
     */
    public void resetData(ReadOnlyTaskBook newData) {
        setTasks(newData.getTasks());
        setFloatingTasks(newData.getFloatingTasks());
        setEventTasks(newData.getEventTasks());
        setDeadlineTasks(newData.getDeadlineTasks());
    }

    //// task operations
{'fraction_non_alphanumeric': 0.09337433603578418, 'fraction_numerical': 0.0, 'mean_word_length': 3.6227390180878554, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5518960', 'n_tokens_mistral': 1001, 'n_tokens_neox': 975, 'n_words': 209}