GATE
Version 3.1-2270

gate.util
Class AnnotationDiffer.PairingScoreComparator

java.lang.Object
  extended by gate.util.AnnotationDiffer.PairingScoreComparator
All Implemented Interfaces:
Comparator
Enclosing class:
AnnotationDiffer

protected static class AnnotationDiffer.PairingScoreComparator
extends Object
implements Comparator

Compares two pairings: the better score is preferred; for the same score the better type is preferred (exact matches are preffered to partial ones).


Constructor Summary
protected AnnotationDiffer.PairingScoreComparator()
           
 
Method Summary
 int compare(Object o1, Object o2)
          Compares two choices: the better score is preferred; for the same score the better type is preferred (exact matches are preffered to partial ones).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Constructor Detail

AnnotationDiffer.PairingScoreComparator

protected AnnotationDiffer.PairingScoreComparator()
Method Detail

compare

public int compare(Object o1,
                   Object o2)
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:
compare in interface Comparator
Returns:
a positive value if the first pairing is better than the second, zero if they score the same or negative otherwise.

GATE
Version 3.1-2270