Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sort inverse feature #73

Conversation

ZHANGTIANYAO1
Copy link

Add sort inverse feature

Copy link

codecov bot commented Apr 2, 2024

Codecov Report

Attention: Patch coverage is 88.33333% with 7 lines in your changes are missing coverage. Please review.

Project coverage is 81.45%. Comparing base (ffd23ed) to head (a7ebefb).
Report is 28 commits behind head on master.

Files Patch % Lines
.../seedu/address/logic/parser/SortCommandParser.java 61.53% 2 Missing and 3 partials ⚠️
...ss/model/person/PersonInterviewTimeComparator.java 75.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master      #73      +/-   ##
============================================
+ Coverage     80.73%   81.45%   +0.72%     
- Complexity      634      661      +27     
============================================
  Files            94       97       +3     
  Lines          1998     2076      +78     
  Branches        219      234      +15     
============================================
+ Hits           1613     1691      +78     
+ Misses          329      328       -1     
- Partials         56       57       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ZHANGTIANYAO1 ZHANGTIANYAO1 added this to the v1.3 milestone Apr 2, 2024
@ZHANGTIANYAO1 ZHANGTIANYAO1 self-assigned this Apr 2, 2024
@Override
public int compare(Person p1, Person p2) {
return Integer.compare(p1.getPriority(), p2.getPriority());
int comparisonResult = Integer.compare(p1.getPriority(), p2.getPriority());
return isReverseOrder ? -comparisonResult : comparisonResult;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

neat code!

@dabzpengu
Copy link

LGTM

@ZHANGTIANYAO1 ZHANGTIANYAO1 merged commit 4f38ad8 into AY2324S2-CS2103T-T08-3:master Apr 2, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants