Class FTMatches

All Implemented Interfaces:
Iterable<FTMatch>

public final class FTMatches extends ObjectList<FTMatch,FTMatches>
AllMatches full-text container, referencing several FTMatch instances.
Author:
BaseX Team 2005-21, BSD License, Christian Gruen
  • Field Details

    • pos

      public int pos
      Position of a token in the query.
  • Constructor Details

    • FTMatches

      public FTMatches()
      Constructor.
    • FTMatches

      public FTMatches(int pos)
      Constructor.
      Parameters:
      pos - query position
  • Method Details

    • reset

      public void reset(int ps)
      Resets the match container.
      Parameters:
      ps - query position
    • or

      public void or(int ps)
      Adds a match entry.
      Parameters:
      ps - position
    • or

      public void or(int start, int end)
      Adds a match entry.
      Parameters:
      start - start position
      end - end position
    • and

      public void and(int start, int end)
      Adds a match entry.
      Parameters:
      start - start position
      end - end position
    • matches

      public boolean matches()
      Checks if at least one of the matches contains only includes.
      Returns:
      result of check
    • phrase

      public boolean phrase(FTMatches all, int distance)
      Combines two matches as phrase.
      Parameters:
      all - second match list
      distance - word distance
      Returns:
      true if matches are left
    • newArray

      protected FTMatch[] newArray(int s)
      Description copied from class: ObjectList
      Creates a resized array.
      Specified by:
      newArray in class ObjectList<FTMatch,FTMatches>
      Parameters:
      s - size
      Returns:
      array
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class ObjectList<FTMatch,FTMatches>