org.basex.query.ft
Class FTWildcard

java.lang.Object
  extended by org.basex.query.ft.FTWildcard

public final class FTWildcard
extends java.lang.Object

Wildcard expression.

Author:
BaseX Team 2005-12, BSD License, Christian Gruen, Dimitar Popov

Constructor Summary
FTWildcard(byte[] qu)
          Constructor.
 
Method Summary
 boolean match(byte[] t)
          Checks if the wildcard can match a sub-string in a string.
 int max()
          Returns the maximum length of a potential match.
 boolean parse()
          Parses and constructs a new wildcard expression.
 byte[] prefix()
          Returns the wildcard prefix, which is the same for all matches.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FTWildcard

public FTWildcard(byte[] qu)
Constructor.

Parameters:
qu - query
Method Detail

parse

public boolean parse()
Parses and constructs a new wildcard expression.

Returns:
success flag

max

public int max()
Returns the maximum length of a potential match.

Returns:
true if a match is found

prefix

public byte[] prefix()
Returns the wildcard prefix, which is the same for all matches.

Returns:
prefix

match

public boolean match(byte[] t)
Checks if the wildcard can match a sub-string in a string.

Parameters:
t - token to search for match
Returns:
true if a match is found