gate.util
Class AnnotationDiffer.Choice

java.lang.Object
  extended bygate.util.AnnotationDiffer.Choice
All Implemented Interfaces:
Comparable
Enclosing class:
AnnotationDiffer

class AnnotationDiffer.Choice
extends Object
implements Comparable

Represents a pairing of a key annotation with a response annotation and the associated score for that pairing.


Field Summary
(package private)  int keyIndex
           
(package private)  int responseIndex
           
(package private)  int score
           
(package private)  boolean scoreCalculated
           
(package private)  int type
           
 
Constructor Summary
(package private) AnnotationDiffer.Choice(int keyIndex, int responseIndex, int type)
           
 
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
 int compareTo(Object other)
          Compares two choices: the better score is preferred; for the same score the better type is preferred (exact matches are preffered to partial ones).
 void consume()
          Removes all mutually exclusive OTHER choices possible from the data structures.
(package private)  int getScore()
           
protected  void remove()
          Removes this choice from the two lists it belongs to
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

keyIndex

int keyIndex

responseIndex

int responseIndex

type

int type

score

int score

scoreCalculated

boolean scoreCalculated
Constructor Detail

AnnotationDiffer.Choice

AnnotationDiffer.Choice(int keyIndex,
                        int responseIndex,
                        int type)
Method Detail

getScore

int getScore()

consume

public void consume()
Removes all mutually exclusive OTHER choices possible from the data structures. this gets removed from AnnotationDiffer.possibleChoices as well.


remove

protected void remove()
Removes this choice from the two lists it belongs to


compareTo

public int compareTo(Object other)
Compares two choices: the better score is preferred; for the same score the better type is preferred (exact matches are preffered to partial ones).

Specified by:
compareTo in interface Comparable
Parameters:
other -
Returns:

calculateScore

void calculateScore()
Calculates the score for this choice as: type - sum of all the types of all OTHER mutually exclusive choices