public class TmHit extends Object implements Comparable<TmHit>
MatchType| Constructor and Description |
|---|
TmHit()
Default constructor which sets the MatchType to NONE.
|
TmHit(TranslationUnit tu,
MatchType matchType,
float score)
Create a new TmHit.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(TmHit other)
This method implements a three way sort on (1) MatchType (2) score (3)
source string.
|
boolean |
equals(Object other)
Define equality of state.
|
int |
getDocId()
Get the document id for the TmHit.
|
MatchType |
getMatchType()
Get the Tmhit's
MatchType |
float |
getScore()
Get the TmHit's score.
|
TranslationUnit |
getTu()
Get the TmHit's
TranslationUnit |
int |
hashCode()
A class that overrides equals must also override hashCode.
|
boolean |
isCodeMismatch()
Is there a difference between the
Codes of the TmHit and the query TextFragment? |
void |
setCodeMismatch(boolean codeMismatch)
Set true of the
Codes between the TmHit and query TextFragment are different. |
void |
setDocId(int docId)
Set the document id for the TmHit.
|
void |
setMatchType(MatchType matchType)
Set the Tmhit's
MatchType |
void |
setScore(Float score)
Set the TmHit's score.
|
void |
setTu(TranslationUnit tu)
Set the TmHit's
TranslationUnit |
public TmHit()
public TmHit(TranslationUnit tu, MatchType matchType, float score)
tu - matchType - score - public float getScore()
public void setScore(Float score)
score - public TranslationUnit getTu()
TranslationUnitTranslationUnitpublic void setTu(TranslationUnit tu)
TranslationUnittu - public void setMatchType(MatchType matchType)
MatchTypematchType - public void setCodeMismatch(boolean codeMismatch)
Codes between the TmHit and query TextFragment are different.codeMismatch - public boolean isCodeMismatch()
Codes of the TmHit and the query TextFragment?public void setDocId(int docId)
docId - public int getDocId()
public int compareTo(TmHit other)
compareTo in interface Comparable<TmHit>other - - the TmHit we are comparing against.public boolean equals(Object other)
Copyright © 2020. All rights reserved.