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:
java.lang.Comparable<MatchResult<?>>
public class MatchResult<T> extends java.lang.Object implements java.lang.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, java.lang.String suggestion, java.lang.String query, javafx.scene.text.TextFlow textFlow)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(MatchResult<?> o)TgetData()Data from which the candidate string was extracted.java.lang.StringgetQuery()Query that was matched against the candidate string.intgetScore()Relevance score of this result.java.lang.StringgetStringMatch()Candidate string that was matched against the query.javafx.scene.text.TextFlowgetTextFlow()Formatted TextFlow with the match regions highlighted.
-
-
-
Constructor Detail
-
MatchResult
public MatchResult(int score, T data, java.lang.String suggestion, java.lang.String query, javafx.scene.text.TextFlow textFlow)
-
-
Method Detail
-
getData
public T getData()
Data from which the candidate string was extracted.
-
getStringMatch
public java.lang.String getStringMatch()
Candidate string that was matched against the query.
-
getQuery
public java.lang.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:
compareToin interfacejava.lang.Comparable<T>
-
-