Package com.atlassian.bamboo.utils
Class Wildcard
- java.lang.Object
-
- com.atlassian.bamboo.utils.Wildcard
-
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.
- Since:
- 3.4
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
matches(@Nullable String pattern, @Nullable String text)
Check whether a given pattern is matched by text.
-
-
-
Method Detail
-
matches
public static boolean matches(@Nullable @Nullable String pattern, @Nullable @Nullable String text)
Check whether a given pattern is matched by text.- Parameters:
pattern
- pattern to match. May benull
, in which casefalse
will be returnedtext
- text to match against pattern. May benull
, in which casefalse
will be returned- Returns:
true
, if text matches pattern,false
otherwise or if text or pattern arenull
-
-