Class MatchResult<T>
- java.lang.Object
-
- net.sourceforge.pmd.util.fxdesigner.util.autocomplete.matchers.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 Summary
Constructors Constructor Description MatchResult(int score, T data, String suggestion, String query, javafx.scene.text.TextFlow textFlow)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(MatchResult<?> o)
T
getData()
Data from which the candidate string was extracted.String
getQuery()
Query that was matched against the candidate string.int
getScore()
Relevance score of this result.String
getStringMatch()
Candidate string that was matched against the query.javafx.scene.text.TextFlow
getTextFlow()
Formatted TextFlow with the match regions highlighted.
-
-
-
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.
-
compareTo
public int compareTo(MatchResult<?> o)
- Specified by:
compareTo
in interfaceComparable<T>
-
-