Package org.apache.struts2.util
Interface PatternMatcher<E>
- All Known Implementing Classes:
- NamedVariablePatternMatcher,- RegexPatternMatcher,- WildcardHelper
public interface PatternMatcher<E>
Compiles and matches a pattern against a value
- Since:
- 2.1
- 
Method SummaryModifier and TypeMethodDescriptioncompilePattern(String data) Translate the givenStringinto an object representing the pattern matchable by this class.booleanDetermines if the pattern is a simple literal string or contains wildcards that will need to be processedbooleanMatch a pattern against a string
- 
Method Details- 
isLiteralDetermines if the pattern is a simple literal string or contains wildcards that will need to be processed- Parameters:
- pattern- The string pattern
- Returns:
- True if the pattern doesn't contain processing elements, false otherwise
 
- 
compilePatternTranslate the given Stringinto an object representing the pattern matchable by this class.- Parameters:
- data- The string to translate.
- Returns:
- The encoded string
- Throws:
- NullPointerException- If data is null.
 
- 
matchMatch a pattern against a string- Parameters:
- map- The map to store matched values
- data- The string to match
- expr- The compiled wildcard expression
- Returns:
- True if a match
- Throws:
- NullPointerException- If any parameters are null
 
 
-