forked from CS2113-AY1819S2-T08-3/main
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Enhance FindCommand to use Levenshtein Distance * Fix Checkstyle * Enhance FindCommand to use Levenshtein Distance (CS2113-AY1819S2-T08-3#126) * Update diagrams and minor text in DeveloperGuide and AboutUs (CS2113-AY1819S2-T08-3#127) * v1.1 * fix some errors and typos * Refactor entire project, remove all traces of Addressbook * Update developer guide for ExportCommandP (CS2113-AY1819S2-T08-3#80) * Update documentation for view command (CS2113-AY1819S2-T08-3#81) * Remove remaining Addressbook classes * Refactor some classes * fix missing files issue * Add test cases for add function, Utils and other code enhancements * fix codacy issues * fix codacy issues * Add tests for Utils * Add diagrams * Update Ui.png * fix issue with Ui.png * Update Codacy Badge link due to reinitialization. * Enhance ordering of slots printed * Update UserGuide.adoc with feedback from peers * Update UserGuide.adoc with nicer tables * Update UserGuide.adoc: fix formatting issues * UserGuide.adoc Remove potential Netlify breaking code * README.adoc revert changes * UserGuide.adoc revert Netlify breakdown test code * Update UserGuide.adoc with Managing Slots and diagrams * Solved unchecked or unsafe operation warnings * Update entire project to follow better software engineering practices * Edit UiClassDiagram.uml and png * Update UiClassDiagram.uml * Update diagrams and minor text in DeveloperGuide and AboutUs * Update DeveloperGuide, manipulating slots * Update DeveloperGuide fix typo * Update "lastshownslots" mechanism * Update Messages.java refactor some functions * resolve merge conflict * Edit FindCommand to generate lastShownList * Resolve checkstyle * Resolve merge conflicts * Edit FindCommand to generate lastShownList (CS2113-AY1819S2-T08-3#128) (#35)
- Loading branch information
1 parent
63ceb82
commit f1ee71a
Showing
4 changed files
with
72 additions
and
54 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,41 @@ | ||
//@@author marcus-pzj | ||
package planmysem.model.semester; | ||
|
||
import java.time.LocalDate; | ||
import java.util.Map; | ||
|
||
import planmysem.model.slot.Slot; | ||
|
||
/** | ||
* WeightedName of integer and string | ||
*/ | ||
|
||
public class WeightedName { | ||
private int dist; | ||
private String name; | ||
private Map.Entry<LocalDate, Day> map; | ||
private Slot slot; | ||
|
||
public WeightedName(String name, int dist) { | ||
this.name = name; | ||
public WeightedName(Map.Entry<LocalDate, Day> map, Slot slot, int dist) { | ||
this.map = map; | ||
this.dist = dist; | ||
this.slot = slot; | ||
this.name = slot.getName(); | ||
} | ||
|
||
public int getDist() { | ||
return this.dist; | ||
} | ||
|
||
public Map.Entry<LocalDate, Day> getMap() { | ||
return map; | ||
} | ||
|
||
public String getName() { | ||
return name; | ||
return this.name; | ||
} | ||
|
||
public Slot getSlot() { | ||
return this.slot; | ||
} | ||
} |