Package com.networknt.schema.regex
Class AllowRegularExpressionFactory
java.lang.Object
com.networknt.schema.regex.AllowRegularExpressionFactory
- All Implemented Interfaces:
RegularExpressionFactory
RegularExpressionFactory that allows regular expressions to be used.-
Constructor Summary
ConstructorsConstructorDescriptionAllowRegularExpressionFactory(RegularExpressionFactory delegate, Predicate<String> allowed) -
Method Summary
Modifier and TypeMethodDescriptiongetRegularExpression(String regex) Gets aRegularExpression.getRegularExpression(String regex, SchemaContext schemaContext) Gets aRegularExpressionin the context of the schema being evaluated.
-
Constructor Details
-
AllowRegularExpressionFactory
-
-
Method Details
-
getRegularExpression
Description copied from interface:RegularExpressionFactoryGets aRegularExpression.- Specified by:
getRegularExpressionin interfaceRegularExpressionFactory- Parameters:
regex- the regular expression text value- Returns:
- the regular expression
-
getRegularExpression
Description copied from interface:RegularExpressionFactoryGets aRegularExpressionin the context of the schema being evaluated.- Specified by:
getRegularExpressionin interfaceRegularExpressionFactory- Parameters:
regex- the regular expression text valueschemaContext- the schema context- Returns:
- the regular expression
-