net.sf.aguacate.regex.spi.pattern.RegexPattern Maven / Gradle / Ivy
package net.sf.aguacate.regex.spi.pattern;
import java.util.regex.Pattern;
import net.sf.aguacate.regex.Regex;
public class RegexPattern implements Regex {
private final Pattern pattern;
public RegexPattern(Pattern pattern) {
this.pattern = pattern;
}
@Override
public boolean matches(String value) {
return pattern.matcher(value).matches();
}
}