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 Command to List Modules by Prefix #59

Merged
merged 2 commits into from
Apr 2, 2024

Conversation

yadunut
Copy link

@yadunut yadunut commented Apr 2, 2024

Closes #48

@yadunut yadunut requested a review from a team April 2, 2024 06:16
Copy link

codecov bot commented Apr 2, 2024

Codecov Report

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

Project coverage is 59.97%. Comparing base (2986685) to head (8353fb3).
Report is 2 commits behind head on master.

Files Patch % Lines
...ress/logic/commands/module/ListModulesCommand.java 0.00% 16 Missing ⚠️
...address/logic/parser/ListModulesCommandParser.java 0.00% 9 Missing ⚠️
...ain/java/seedu/address/model/module/ModuleMap.java 0.00% 6 Missing ⚠️
...in/java/seedu/address/commons/util/StringUtil.java 0.00% 3 Missing ⚠️
.../seedu/address/logic/parser/AddressBookParser.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master      #59      +/-   ##
============================================
- Coverage     61.09%   59.97%   -1.12%     
  Complexity      434      434              
============================================
  Files            89       91       +2     
  Lines          1776     1809      +33     
  Branches        170      175       +5     
============================================
  Hits           1085     1085              
- Misses          653      686      +33     
  Partials         38       38              

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

Comment on lines +52 to +54
* Truncates the string {@code s} to the specified {@code length}.
* If the length of {@code s} is less than or equal to {@code length}, returns {@code s}.
* Otherwise, returns a truncated string of length {@code length} with "..." appended at the end.
Copy link

Choose a reason for hiding this comment

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

Wow! Very nice comment yadunut!

@@ -22,4 +24,14 @@ public boolean hasModule(ModuleCode code) {
public Module getModule(ModuleCode code) {
return moduleMap.get(code);
}

public List<Module> getModulesByPrefix(String prefix) {
Copy link

Choose a reason for hiding this comment

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

Nice function! 👭

@yadunut yadunut merged commit e9ba2ff into AY2324S2-CS2103T-W12-2:master Apr 2, 2024
1 of 3 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.

As a user, I want to be able to search for modules
2 participants