All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.networknt.schema.regex.RegularExpression Maven / Gradle / Ivy

The newest version!
package com.networknt.schema.regex;

import com.networknt.schema.ValidationContext;

/**
 * Regular expression.
 */
@FunctionalInterface
public interface RegularExpression {
    boolean matches(String value);

    static RegularExpression compile(String regex, ValidationContext validationContext) {
        if (null == regex) return s -> true;
        return validationContext.getConfig().getRegularExpressionFactory().getRegularExpression(regex);
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy