Skip to content

Commit

Permalink
Delete all dead code in classes
Browse files Browse the repository at this point in the history
  • Loading branch information
bennyLCK committed Apr 15, 2024
1 parent f2decc2 commit ad6f136
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 35 deletions.
31 changes: 0 additions & 31 deletions src/main/java/seedu/address/model/article/UniqueArticleList.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,6 @@ public boolean contains(Article toCheck) {
*/
public void add(Article toAdd) {
requireNonNull(toAdd);

/*
if (contains(toAdd)) {
throw new DuplicatePersonException();
}
*/

internalList.add(toAdd);
}

Expand All @@ -55,16 +47,6 @@ public void setArticle(Article target, Article editedArticle) {

int index = internalList.indexOf(target);

/*
if (index == -1) {
throw new PersonNotFoundException();
}
if (!target.isSameArticle(editedArticle) && contains(editedArticle)) {
throw new DuplicatePersonException();
}
*/

internalList.set(index, editedArticle);
}

Expand All @@ -74,12 +56,6 @@ public void setArticle(Article target, Article editedArticle) {
public void remove(Article toRemove) {
requireNonNull(toRemove);
internalList.remove(toRemove);

/*
if (!internalList.remove(toRemove)) {
throw new PersonNotFoundException();
}
*/
}

public void setArticles(UniqueArticleList replacement) {
Expand All @@ -93,13 +69,6 @@ public void setArticles(UniqueArticleList replacement) {
*/
public void setArticles(List<Article> articles) {
requireAllNonNull(articles);

/*
if (!personsAreUnique(persons)) {
throw new DuplicatePersonException();
}
*/

internalList.setAll(articles);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ public NameWithinArticlePredicate(Article article) {

@Override
public boolean test(Person person) {
/*return article.getAuthors().stream()
.anyMatch(author -> person.getName().fullName.equals(author.authorName)) ||
article.getSources().stream()
.anyMatch(source -> person.getName().fullName.equals(source.sourceName));*/
return article.getPersons().contains(person);
}

Expand Down

0 comments on commit ad6f136

Please sign in to comment.