package seedu.address.storage;

public class XmlTaskList {

}

@@ -29,34 +29,1953 @@
 e;%0A%0A
-public class XmlTaskList %7B
+%0Aimport java.util.List;%0Aimport java.util.stream.Collectors;%0A%0Aimport javax.xml.bind.annotation.XmlElement;%0Aimport javax.xml.bind.annotation.XmlValue;%0A%0Aimport javafx.collections.FXCollections;%0Aimport javafx.collections.ObservableList;%0Aimport seedu.address.commons.exceptions.IllegalValueException;%0Aimport seedu.address.model.task.Task;%0Aimport seedu.address.model.tasklist.TaskList;%0A%0A/**%0A * JAXB-friendly adapted version of the Tag.%0A */%0Apublic class XmlTaskList %7B%0A%0A    @XmlValue%0A    public String taskListName;%0A    @XmlValue%0A    @XmlElement%0A    private List%3CXmlAdaptedTask%3E tasksList;%0A%0A    /**%0A     * Constructs an XmlAdaptedTag.%0A     * This is the no-arg constructor that is required by JAXB.%0A     */%0A    public XmlTaskList() %7B%7D%0A%0A    /**%0A     * Converts a given Tag into this class for JAXB use.%0A     *%0A     * @param source future changes to this will not affect the created%0A     */%0A    public XmlTaskList(TaskList source) %7B%0A        taskListName = source.getName();%0A        tasksList.addAll(source.getTasks().asObservableList().stream().map(XmlAdaptedTask::new).collect(Collectors.toList()));%0A    %7D%0A%0A    /**%0A     * Converts this jaxb-friendly adapted tag object into the model's Tag object.%0A     *%0A     * @throws IllegalValueException if there were any data constraints violated in the adapted person%0A     */%0A    public TaskList toModelType() throws IllegalValueException %7B%0A        TaskList taskList = new TaskList(taskListName);%0A        final ObservableList%3CTask%3E tasks = this.tasksList.stream().map(t -%3E %7B%0A            try %7B%0A                return t.toModelType();%0A            %7D catch (IllegalValueException e) %7B%0A                e.printStackTrace();%0A                //TODO: better error handling%0A                return null;%0A            %7D%0A        %7D).collect(Collectors.toCollection(FXCollections::observableArrayList));%0A        tasksList.addAll(tasks.stream().map(XmlAdaptedTask::new).collect(Collectors.toList()));%0A        return taskList;%0A    %7D
 %0A%0A%7D%0A

implement methods in XmlTaskList for storage