public final class Wildcard extends Object
Simple wildcard matcher, supporting '*' and '?' wildcard.
Adapted from http://introcs.cs.princeton.edu/java/72regular/Wildcard.java.html that states it is NOT the most efficient implementation ever.
Modifier and Type | Method and Description |
---|---|
static boolean |
matches(String pattern,
String text)
Check whether a given pattern is matched by text.
|
public static boolean matches(@Nullable String pattern, @Nullable String text)
pattern
- pattern to match. May be null
, in which case false
will be returnedtext
- text to match against pattern. May be null
, in which case false
will
be returnedtrue
, if text matches pattern, false
otherwise or if
text or pattern are null
Copyright © 2021 Atlassian Software Systems Pty Ltd. All rights reserved.