forked from nusCS2113-AY1920S1/PersonalAssistant-Duke
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #92 from Raghav-B/master
Add B-FindFreeTimes
- Loading branch information
Showing
8 changed files
with
134 additions
and
20 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
0/E/0/pizza party /20/09/2019 1800 to 20/09/2019 2000 | ||
1/E/0/pon lecture /20/09/2019 1600 to 20/09/2019 1800 | ||
2/E/0/not do work /20/09/2019 2359 to 23/09/2019 0800 | ||
0/E/0/pizza party /20/09/2019 0600 to 20/09/2019 0800 | ||
1/E/0/pon lecture /20/09/2019 0900 to 20/09/2019 1000 | ||
2/E/0/not do work /20/09/2019 1200 to 20/09/2019 1500 | ||
3/E/0/die /20/09/2019 2100 to 20/09/2019 2300 | ||
4/E/0/ohman /20/09/2019 0200 to 20/09/2019 1900 |
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,9 @@ | ||
package duke; | ||
import duke.items.Event; | ||
import java.util.Comparator; | ||
|
||
public class EventDateTimeComparator implements Comparator<Event> { | ||
public int compare(Event first, Event second) { | ||
return first.getEventStartTimeObj().getAt().compareTo(second.getEventStartTimeObj().getAt()); | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package duke.commands; | ||
|
||
import duke.Storage; | ||
import duke.TaskList; | ||
import duke.Ui; | ||
|
||
public class FindFreeTimeCommand extends Command { | ||
int reqFreeHours; | ||
|
||
public FindFreeTimeCommand(CommandType type, int reqFreeHours) { | ||
super(type); | ||
this.reqFreeHours = reqFreeHours; | ||
} | ||
|
||
@Override | ||
public void execute(TaskList list, Ui ui, Storage storage) { | ||
list.findFreeHours(reqFreeHours); | ||
} | ||
} |
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