站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > Spring Framework 2.1.0 API 文档英文版

PatternMatchUtils (Spring Framework API 2.1) - Spring Framework 2.1.0 API 文档英文版


The Spring Framework

org.springframework.util
Class PatternMatchUtils

java.lang.Object
  extended by org.springframework.util.PatternMatchUtils

public abstract class PatternMatchUtils
extends Object

Utility methods for simple pattern matching, in particular for Spring's typical "xxx*", "*xxx" and "*xxx*" pattern styles.

Since:
2.0
Author:
Juergen Hoeller

Constructor Summary
PatternMatchUtils()
           
 
Method Summary
static boolean simpleMatch(String[] patterns, String str)
          Match a String against the given patterns, supporting the following simple pattern styles: "xxx*", "*xxx" and "*xxx*" matches, as well as direct equality.
static boolean simpleMatch(String pattern, String str)
          Match a String against the given pattern, supporting the following simple pattern styles: "xxx*", "*xxx" and "*xxx*" matches, as well as direct equality.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PatternMatchUtils

public PatternMatchUtils()
Method Detail

simpleMatch

public static boolean simpleMatch(String pattern,
                                  String str)
Match a String against the given pattern, supporting the following simple pattern styles: "xxx*", "*xxx" and "*xxx*" matches, as well as direct equality.

Parameters:
pattern - the pattern to match against
str - the String to match
Returns:
whether the String matches the given pattern

simpleMatch

public static boolean simpleMatch(String[] patterns,
                                  String str)
Match a String against the given patterns, supporting the following simple pattern styles: "xxx*", "*xxx" and "*xxx*" matches, as well as direct equality.

Parameters:
patterns - the patterns to match against
str - the String to match
Returns:
whether the String matches any of the given patterns

The Spring Framework

Copyright © 2002-2007 The Spring Framework.