-
Notifications
You must be signed in to change notification settings - Fork 548
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cf8e8bc
commit 9edc419
Showing
9 changed files
with
95 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
src/main/java/seedu/address/model/student/GroupMemberPredicate.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package seedu.address.model.student; | ||
|
||
import java.util.function.Predicate; | ||
|
||
import seedu.address.model.tutorialgroup.TutorialGroup; | ||
|
||
/** | ||
* Tests that a {@code Student}'s {@code TutorialGroup} matches the given TutorialGroup. | ||
*/ | ||
public class GroupMemberPredicate implements Predicate<Student> { | ||
private final TutorialGroup tutorialGroup; | ||
|
||
public GroupMemberPredicate(TutorialGroup tutorialGroup) { | ||
this.tutorialGroup = tutorialGroup; | ||
} | ||
|
||
public TutorialGroup getTutorialGroup() { | ||
return tutorialGroup; | ||
} | ||
|
||
@Override | ||
public boolean test(Student student) { | ||
return student.getTutorialGroups().contains(tutorialGroup); | ||
} | ||
|
||
@Override | ||
public boolean equals(Object other) { | ||
return other == this // short circuit if same instance | ||
|| other instanceof GroupMemberPredicate // instanceof handles null | ||
&& tutorialGroup.equals(((GroupMemberPredicate) other).getTutorialGroup()); // state check | ||
} | ||
} |
30 changes: 0 additions & 30 deletions
30
src/main/java/seedu/address/model/student/GroupNamePredicate.java
This file was deleted.
Oops, something went wrong.
32 changes: 0 additions & 32 deletions
32
src/main/java/seedu/address/model/student/GroupTypePredicate.java
This file was deleted.
Oops, something went wrong.