Last active
January 30, 2019 08:25
-
-
Save nschlimm/a1931f2fe787c7f03a4b17d023373ff4 to your computer and use it in GitHub Desktop.
Predicates with standard parameter
This file contains hidden or 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
public static class Predicates { | |
private String pattern; | |
public boolean containsPattern(String string) { | |
return string.contains(pattern); | |
} | |
public Predicates(String pattern) { | |
this.pattern = pattern; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment