forked from se-edu/addressbook-level4
-
Notifications
You must be signed in to change notification settings - Fork 109
/
Copy pathModel.java
35 lines (25 loc) · 1.2 KB
/
Model.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package seedu.address.model;
import seedu.address.commons.core.UnmodifiableObservableList;
import seedu.address.model.person.Person;
import seedu.address.model.person.ReadOnlyPerson;
import seedu.address.model.person.UniquePersonList;
import java.util.Set;
/**
* The API of the Model component.
*/
public interface Model {
/** Clears existing backing model and replaces with the provided new data. */
void resetData(ReadOnlyAddressBook newData);
/** Returns the AddressBook */
ReadOnlyAddressBook getAddressBook();
/** Deletes the given person. */
void deletePerson(ReadOnlyPerson target) throws UniquePersonList.PersonNotFoundException;
/** Adds the given person */
void addPerson(Person person) throws UniquePersonList.DuplicatePersonException;
/** Returns the filtered person list as an {@code UnmodifiableObservableList<ReadOnlyPerson>} */
UnmodifiableObservableList<ReadOnlyPerson> getFilteredPersonList();
/** Updates the filter of the filtered person list to show all persons */
void updateFilteredListToShowAll();
/** Updates the filter of the filtered person list to filter by the given keywords*/
void updateFilteredPersonList(Set<String> keywords);
}