Package org.basex.query.expr.ft
Class FTWildcard
java.lang.Object
org.basex.query.expr.ft.FTWildcard
Wildcard expression.
- Author:
- BaseX Team 2005-21, BSD License, Christian Gruen, Dimitar Popov
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanmatch(byte[] tok) Checks if the wildcard can match a sub-string in a string.intmax(boolean full) Returns the maximum byte length of a potential match in the index.byte[]prefix()Returns the wildcard prefix, which is the same for all matches.booleansimple()Indicates if the wildcard expression was valid.booleanvalid()Indicates if the input contains no wildcard characters.
-
Constructor Details
-
FTWildcard
public FTWildcard(byte[] token) Constructor.- Parameters:
token- query token
-
-
Method Details
-
simple
public boolean simple()Indicates if the wildcard expression was valid.- Returns:
- result of check
-
max
public int max(boolean full) Returns the maximum byte length of a potential match in the index.- Parameters:
full- support full range of Unicode characters- Returns:
- maximum length
-
prefix
public byte[] prefix()Returns the wildcard prefix, which is the same for all matches.- Returns:
- prefix
-
match
public boolean match(byte[] tok) Checks if the wildcard can match a sub-string in a string.- Parameters:
tok- token to search for match- Returns:
trueif a match is found
-
valid
public boolean valid()Indicates if the input contains no wildcard characters.- Returns:
- result of check
-