Class MatchResult<T>

  • Type Parameters:
    T - type of input to the algorithm
    All Implemented Interfaces:
    Comparable<MatchResult<?>>

    public class MatchResult<T>
    extends Object
    implements Comparable<MatchResult<?>>
    Result of a match algorithm.
    Since:
    7.0.0
    Author:
    Clément Fournier
    • Constructor Detail

      • MatchResult

        public MatchResult​(int score,
                           T data,
                           String suggestion,
                           String query,
                           javafx.scene.text.TextFlow textFlow)
    • Method Detail

      • getData

        public T getData()
        Data from which the candidate string was extracted.
      • getStringMatch

        public String getStringMatch()
        Candidate string that was matched against the query.
      • getQuery

        public String getQuery()
        Query that was matched against the candidate string. This is the user input.
      • getTextFlow

        public javafx.scene.text.TextFlow getTextFlow()
        Formatted TextFlow with the match regions highlighted.
      • getScore

        public int getScore()
        Relevance score of this result. This is largely implementation specific and has no meaning unless comparing with results selected by the same implementation that produced this match.