com.opensymphony.xwork2.util
Interface PatternMatcher<E>

All Known Implementing Classes:
WildcardHelper

public interface PatternMatcher<E>

Compiles and matches a pattern against a value

Since:
2.1

Method Summary
 E compilePattern(String data)
           Translate the given String into an object representing the pattern matchable by this class.
 boolean match(Map<String,String> map, String data, E expr)
          Match a pattern against a string
 

Method Detail

compilePattern

E compilePattern(String data)

Translate the given String into 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.

match

boolean match(Map<String,String> map,
              String data,
              E expr)
Match 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


Copyright © 2007 OpenSymphony. All Rights Reserved.