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

[Tan Kang Liang] iP #308

Open
wants to merge 88 commits into
base: master
Choose a base branch
from

Conversation

tankangliang
Copy link

No description provided.

* @param input Input from user.
*/
private void listByDueDate(String input) {
Optional<LocalDate> optionalDate;

Choose a reason for hiding this comment

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

Nice use of Optional!


/**
* Receives input continuously until "bye" command is given.
* Main loop of the bot.

Choose a reason for hiding this comment

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

JavaDocs can be updated to account for the return type of String[] this time

Copy link
Author

Choose a reason for hiding this comment

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

Thanks for pointing that out!

/**
* LocalStorage makes use of Serializable objects to write to a local file.
*/
public class LocalStorage implements Storage {

Choose a reason for hiding this comment

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

Really neat exemplification of abstraction with interfaces for Storage implemented by main class LocalStorage!

private List<Task> tasks;

public TaskList() {
this.tasks = new ArrayList<Task>();

Choose a reason for hiding this comment

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

this. can be removed for better readability

Copy link
Author

Choose a reason for hiding this comment

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

Thanks! I'll remove all the uses that don't disambiguate anything.

*/
public String[] getStatusesByDate(Optional<LocalDate> optionalDate) {

return this.tasks.stream()

Choose a reason for hiding this comment

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

Awesome use of streams & FP to filter out the tasks with dates!

Copy link

@Rishi5154 Rishi5154 left a comment

Choose a reason for hiding this comment

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

Your code was really cool and I had a great revision on my forgotten knowledge of Java streams & FP. Just some really minor issues with the code readability but overall it's awesome!

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.

None yet

3 participants