Package org.brijframework.util.formatter
Class PatternUtil
- java.lang.Object
-
- org.brijframework.util.formatter.PatternUtil
-
public class PatternUtil extends Object
-
-
Constructor Summary
Constructors Constructor Description PatternUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringdateMatch(String dateStr)static StringdateTimeMatch(String dateTimeStr)Match a String against the given pattern, supporting the following simple pattern styles: "xxx*", "*xxx", "*xxx*" and "xxx*yyy" matches (with an arbitrary number of pattern parts), as well as direct equality.static Map<String,String>patternMap()static StringpatternMatch(String date)static booleansimpleMatch(String[] patterns, String str)Match a String against the given patterns, supporting the following simple pattern styles: "xxx*", "*xxx", "*xxx*" and "xxx*yyy" matches (with an arbitrary number of pattern parts), as well as direct equality.static booleansimpleMatch(String pattern, String str)Match a String against the given pattern, supporting the following simple pattern styles: "xxx*", "*xxx", "*xxx*" and "xxx*yyy" matches (with an arbitrary number of pattern parts), as well as direct equality.static StringtimeMatch(String timeStr)
-
-
-
Method Detail
-
dateTimeMatch
public static String dateTimeMatch(String dateTimeStr)
Match a String against the given pattern, supporting the following simple pattern styles: "xxx*", "*xxx", "*xxx*" and "xxx*yyy" matches (with an arbitrary number of pattern parts), as well as direct equality.- Parameters:
pattern- the pattern to match againststr- the String to match- Returns:
- whether the String matches the given pattern
-
simpleMatch
public static boolean simpleMatch(String pattern, String str)
Match a String against the given pattern, supporting the following simple pattern styles: "xxx*", "*xxx", "*xxx*" and "xxx*yyy" matches (with an arbitrary number of pattern parts), as well as direct equality.- Parameters:
pattern- the pattern to match againststr- 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", "*xxx*" and "xxx*yyy" matches (with an arbitrary number of pattern parts), as well as direct equality.- Parameters:
patterns- the patterns to match againststr- the String to match- Returns:
- whether the String matches any of the given patterns
-
-