Skip to content

pig-latin: convert to use instance methods #414

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

Merged
merged 1 commit into from
Apr 7, 2017

Conversation

stkent
Copy link
Contributor

@stkent stkent commented Apr 5, 2017

Closes #360.

If I understand correctly, this is now an example of a "Function Object" rather than a "Value Object"? Yay, functions as almost-first-class citizens.

.anyMatch(x -> word.startsWith(x));
private boolean wordStartsWithPrefixes(String word, String... prefixes) {
return Arrays.stream(prefixes)
.anyMatch(word::startsWith);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Both these changes suggested by IntelliJ.

@@ -1,5 +1,4 @@
import org.junit.Test;
import org.junit.Ignore;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unused because of the parametrization.

@stkent stkent changed the title pig-latin: convert to use instance methods [closes #360] pig-latin: convert to use instance methods Apr 5, 2017
Copy link
Contributor

@FridaTveit FridaTveit left a comment

Choose a reason for hiding this comment

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

Looks great! :)

@FridaTveit FridaTveit merged commit 906963f into master Apr 7, 2017
@stkent stkent deleted the 360-pig-latin-instance-methods branch April 22, 2017 18:41
ErikSchierboom pushed a commit to ErikSchierboom/java that referenced this pull request Jan 26, 2021
ErikSchierboom pushed a commit to ErikSchierboom/java that referenced this pull request Jan 27, 2021
ErikSchierboom pushed a commit to ErikSchierboom/java that referenced this pull request Jan 28, 2021
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.

2 participants