Class SimpleGlobPattern
- java.lang.Object
-
- org.hibernate.search.util.common.pattern.spi.SimpleGlobPattern
-
public abstract class SimpleGlobPattern extends Object
A simple glob pattern implementation that only supports the*wildcard.Crucially, this implementation:
- does not rely on regexps and thus does not require any escaping of the pattern string;
- allows easily prepending a literal to a given pattern, which is convenient when working with index schemas.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static SimpleGlobPatterncompile(String patternString)booleanmatches(String candidate)protected abstract booleanmatches(String candidate, int startIndex)protected abstract intminLength()SimpleGlobPatternprependLiteral(String literal)SimpleGlobPatternprependMany()Optional<String>toLiteral()abstract StringtoPatternString()
-
-
-
Method Detail
-
compile
public static SimpleGlobPattern compile(String patternString)
-
matches
public boolean matches(String candidate)
-
prependLiteral
public SimpleGlobPattern prependLiteral(String literal)
-
prependMany
public SimpleGlobPattern prependMany()
-
toPatternString
public abstract String toPatternString()
-
minLength
protected abstract int minLength()
-
matches
protected abstract boolean matches(String candidate, int startIndex)
-
-