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

[W5.7][F11-2]Tan Jiaqing #442

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

JiaqingTan
Copy link

Add case-insensitive feature to find function

@JiaqingTan
Copy link
Author

Ready for review

@adamwth
Copy link

adamwth commented Sep 13, 2018

Nice enhancement! Might want to add your JUnit and I/O tests too!

@teowz46
Copy link

teowz46 commented Sep 13, 2018

Just a minor nitpick, but I think it would be nicer to use the Set's iterator by using a for loop (for (String s : keywords)) instead of assigning the iterator to a variable. Also the number of line breaks in your convertLowerCase function seems rather excessive =P

Copy link

@liliwei25 liliwei25 left a comment

Choose a reason for hiding this comment

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

Good job! No major issues. 👍

if (!Collections.disjoint(wordsInName, keywords)) {
matchedPersons.add(person);
}
}
return matchedPersons;
}

private Set<String> convertLowercase(Set<String> keywords) {

Choose a reason for hiding this comment

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

Try to follow naming convention, i.e. convertToLowercase

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants