Class PatternValidator
java.lang.Object
org.apache.hadoop.yarn.service.utils.PatternValidator
Utility class to validate strings against a predefined pattern.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
E_INVALID_NAME
- See Also:
-
-
Constructor Details
-
PatternValidator
-
-
Method Details
-
validate
Validate the name -restricting it to the set defined in- Parameters:
name- name to validate- Throws:
IllegalArgumentException- if not a valid name
-
matches
Query to see if the pattern matches- Parameters:
name- name to validate- Returns:
- true if the string matches the pattern
-