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 SimpleGlobPattern
compile(String patternString)
boolean
matches(String candidate)
protected abstract boolean
matches(String candidate, int startIndex)
protected abstract int
minLength()
SimpleGlobPattern
prependLiteral(String literal)
SimpleGlobPattern
prependMany()
Optional<String>
toLiteral()
abstract String
toPatternString()
-
-
-
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)
-
-