Class FTWildcard

java.lang.Object
org.basex.query.expr.ft.FTWildcard

public final class FTWildcard extends Object
Wildcard expression.
Author:
BaseX Team 2005-21, BSD License, Christian Gruen, Dimitar Popov
  • Constructor Summary

    Constructors
    Constructor
    Description
    FTWildcard(byte[] token)
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    match(byte[] tok)
    Checks if the wildcard can match a sub-string in a string.
    int
    max(boolean full)
    Returns the maximum byte length of a potential match in the index.
    byte[]
    Returns the wildcard prefix, which is the same for all matches.
    boolean
    Indicates if the wildcard expression was valid.
    boolean
    Indicates if the input contains no wildcard characters.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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:
      true if a match is found
    • valid

      public boolean valid()
      Indicates if the input contains no wildcard characters.
      Returns:
      result of check