Skip to content

pig-latin: convert to use instance methods - #414

Merged
FridaTveit merged 1 commit into
masterfrom
360-pig-latin-instance-methods
Apr 7, 2017
Merged

FridaTveit merged 1 commit into
masterfrom
360-pig-latin-instance-methods

Conversation

@stkent

@stkent stkent commented Apr 5, 2017 •

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown
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

@FridaTveit FridaTveit left a comment

Copy link
Copy Markdown
Contributor

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