Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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

All Known Implementing Classes:
  NamedVariablePatternMatcher, WildcardHelper

    public interface PatternMatcher<E>

Compiles and matches a pattern against a value

Since:
  2.1

Method Summary
`E` | `compilePattern(java.lang.String data)` Translate the given `String` into an object representing the pattern matchable by this class.
`boolean` | `isLiteral(java.lang.String pattern)` Determines if the pattern is a simple literal string or contains wildcards that will need to be processed
`boolean` | `match(java.util.Map<java.lang.String,java.lang.String> map, java.lang.String data, E expr)` Match a pattern against a string

Method Detail

### isLiteral

    boolean isLiteral(java.lang.String pattern)

  Determines 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

### compilePattern

    E compilePattern(java.lang.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:
    `java.lang.NullPointerException` - If data is null.

### match

    boolean match(java.util.Map<java.lang.String,java.lang.String> map,
                  java.lang.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:
    `java.lang.NullPointerException` - If any parameters are null

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.