Package org.elasticsearch.common
Class Glob
java.lang.Object
org.elasticsearch.common.Glob
public class Glob
extends java.lang.Object
Utility class for glob-like matching
-
Constructor Summary
Constructors Constructor Description Glob()
-
Method Summary
Modifier and Type Method Description static boolean
globMatch(java.lang.String pattern, java.lang.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.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
Glob
public Glob()
-
-
Method Details
-
globMatch
public static boolean globMatch(java.lang.String pattern, java.lang.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
-