|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectgate.util.AnnotationDiffer.PairingImpl
public class AnnotationDiffer.PairingImpl
Represents a pairing of a key annotation with a response annotation and the associated score for that pairing.
| Field Summary | |
|---|---|
(package private) int |
keyIndex
The index in the key collection of the key annotation for this pairing |
(package private) int |
responseIndex
The index in the response collection of the response annotation for this pairing |
(package private) int |
score
The score of this pairing (calculated based on value and conflict set). |
(package private) boolean |
scoreCalculated
|
(package private) int |
type
The type of this pairing. |
(package private) int |
value
The value for this pairing. |
| Constructor Summary | |
|---|---|
AnnotationDiffer.PairingImpl(int keyIndex,
int responseIndex,
int value)
|
|
| Method Summary | |
|---|---|
(package private) void |
calculateScore()
Calculates the score for this choice as: type - sum of all the types of all OTHER mutually exclusive choices |
void |
consume()
Removes all mutually exclusive OTHER choices possible from the data structures. |
Annotation |
getKey()
Gets the key annotation of the pairing. |
Annotation |
getResponse()
Gets the response annotation of the pairing. |
int |
getScore()
|
int |
getType()
Gets the type of the pairing, one of AnnotationDiffer.CORRECT_TYPE,
AnnotationDiffer.PARTIALLY_CORRECT_TYPE, AnnotationDiffer.SPURIOUS_TYPE or
AnnotationDiffer.MISSING_TYPE, |
protected void |
remove()
Removes this choice from the two lists it belongs to |
void |
setType(int type)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
int keyIndex
int responseIndex
int type
int value
int score
boolean scoreCalculated
| Constructor Detail |
|---|
AnnotationDiffer.PairingImpl(int keyIndex,
int responseIndex,
int value)
| Method Detail |
|---|
public int getScore()
public Annotation getKey()
AnnotationDiffer.Pairing
getKey in interface AnnotationDiffer.PairingAnnotation object.public Annotation getResponse()
AnnotationDiffer.Pairing
getResponse in interface AnnotationDiffer.PairingAnnotation object.public int getType()
AnnotationDiffer.PairingAnnotationDiffer.CORRECT_TYPE,
AnnotationDiffer.PARTIALLY_CORRECT_TYPE, AnnotationDiffer.SPURIOUS_TYPE or
AnnotationDiffer.MISSING_TYPE,
getType in interface AnnotationDiffer.Pairingpublic void setType(int type)
public void consume()
AnnotationDiffer.possibleChoices as well.
protected void remove()
void calculateScore()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||