Reusable Java library of general tools with minimal external dependencies.
For questions or support, please contact us:
Email: support@aoindustries.com
Phone: 1-800-519-9541
Phone: +1-251-607-9556
Web: https://aoindustries.com/contact
public abstract class WildcardPatternMatcher extends Object
Any consecutive sequence of '*' are combined into a single '*'.
All matchers are thread-safe.
WildcardPatternMatcher are measured typically 2 to 100 times as fast as Pattern,
and have been measured up to 2000 times as fast in contrived scenarios (suffix match on long strings),
and should never be slower in their limited use-case domain.
TODO: Support "**" as an escape for literal '*' in matching? No longer collapse adjacent '*'?
| Modifier and Type | Method and Description |
|---|---|
static WildcardPatternMatcher |
compile(String patterns)
Gets the matcher for the comma and/or space separated patterns.
|
static WildcardPatternMatcher |
getInstance(String patterns)
Deprecated.
Please use
compile(java.lang.String) instead. |
static WildcardPatternMatcher |
getMatchAll()
Deprecated.
Please use
matchAll() instead. |
static WildcardPatternMatcher |
getMatchNone()
Deprecated.
Please use
matchNone() instead. |
boolean |
isEmpty()
Checks if this is empty (has no patterns).
|
abstract boolean |
isMatch(String paramName) |
static WildcardPatternMatcher |
matchAll()
Gets the match all matcher.
|
static WildcardPatternMatcher |
matchNone()
Gets the match none matcher.
|
public static WildcardPatternMatcher matchNone()
@Deprecated public static WildcardPatternMatcher getMatchNone()
matchNone() instead.public static WildcardPatternMatcher matchAll()
@Deprecated public static WildcardPatternMatcher getMatchAll()
matchAll() instead.public static WildcardPatternMatcher compile(String patterns)
Any null or empty pattern matches none.
@Deprecated public static WildcardPatternMatcher getInstance(String patterns)
compile(java.lang.String) instead.public boolean isEmpty()
public abstract boolean isMatch(String paramName)
Copyright © 2000–2019 AO Industries, Inc.. All rights reserved.