Skip to content

Commit

Permalink
Added more collate comments
Browse files Browse the repository at this point in the history
  • Loading branch information
qiwei24 committed Oct 25, 2016
1 parent 5154334 commit f054850
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/main/java/seedu/address/model/AddressBook.java
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ public void addTask(Task p) throws UniqueTaskList.DuplicateTaskException {
tasks.add(p);
}

//@@author A0139046E
/**
* Adds a task to the address book at the specific index
* Also checks the new task's tags and updates {@link #tags} with any new tags found,
Expand All @@ -94,6 +95,7 @@ public void addTaskToIndex(Task p, int index) throws UniqueTaskList.DuplicateTas
syncTagsWithMasterList(p);
tasks.addToIndex(p, index);
}
//@@author

/**
* Ensures that every tag in this task:
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/seedu/address/model/Model.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,11 @@ public interface Model {
/** Adds the given task */
void addTask(Task task) throws UniqueTaskList.DuplicateTaskException;

//@@author A0139046E
/** Adds the given task at the specific index*/
void addTaskToIndex(Task task, int index) throws UniqueTaskList.DuplicateTaskException;

//@@author

/** Saves the current state onto stack*/
void saveState(String commandText);

Expand Down
2 changes: 2 additions & 0 deletions src/main/java/seedu/address/model/ModelManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,14 @@ public synchronized void addTask(Task task) throws UniqueTaskList.DuplicateTaskE
indicateAddressBookChanged();
}

//@@author A0139046E
@Override
public synchronized void addTaskToIndex(Task task, int index) throws UniqueTaskList.DuplicateTaskException {
addressBook.addTaskToIndex(task, index);
updateFilteredListToShowAll();
indicateAddressBookChanged();
}
//@@author

//=========== Filtered Task List Accessors ===============================================================

Expand Down
2 changes: 2 additions & 0 deletions src/main/java/seedu/address/model/task/DateParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ public static LocalDateTime editDate(String dateString, LocalDateTime oldDatetim
return newDate;
}

//@@author A0139046E
/*
* Reschedule a date based on a string rescheduleInterval parsed using TimeInterval
* Time interval added by to the current datetime using natty
Expand All @@ -60,6 +61,7 @@ public static LocalDateTime rescheduleDate(LocalDateTime rescheduleDatetime, Str

return rescheduleDatetime;
}
//@@author

/*
* Searches natty's generated date tree for a string value
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/seedu/address/model/task/UniqueTaskList.java
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ public void add(Task toAdd) throws DuplicateTaskException {
}
internalList.add(toAdd);
}


//@@author A0139046E
/**
* Adds a task to the list at the specific index
*
Expand All @@ -83,6 +84,7 @@ public void addToIndex(Task toAdd, int index) throws DuplicateTaskException {
}
internalList.add(index, toAdd);
}
//@@author

/**
* Removes the equivalent task from the list.
Expand Down

0 comments on commit f054850

Please sign in to comment.