Add Regex.wildcard() factory method

This commit is contained in:
Paul Schaub 2022-12-01 15:20:36 +01:00
parent fffb4b17a4
commit 15142b5775
1 changed files with 9 additions and 0 deletions

View File

@ -25,4 +25,13 @@ public interface Regex {
* @return true if matches, false otherwise
*/
boolean matches(String string);
static Regex wildcard() {
return new Regex() {
@Override
public boolean matches(String string) {
return true;
}
};
}
}