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-24, BSD License, Christian Gruen
    • Field Detail

      • pos

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

      • FTMatches

        public FTMatches()
        Constructor.
      • FTMatches

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

      • 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 matches,
                              int distance)
        Combines two matches as phrase.
        Parameters:
        matches - second match list
        distance - word distance
        Returns:
        true if matches are left