gate.util
Class AnnotationDiffer.PairingScoreComparator
java.lang.Object
gate.util.AnnotationDiffer.PairingScoreComparator
- All Implemented Interfaces:
- Comparator
- Enclosing class:
- AnnotationDiffer
- protected static class AnnotationDiffer.PairingScoreComparator
- extends Object
- implements Comparator
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 |
AnnotationDiffer.PairingScoreComparator
protected AnnotationDiffer.PairingScoreComparator()
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.