info.ephyra.answerselection.filters
Class ResultLengthComparator<T>

java.lang.Object
  extended by info.ephyra.answerselection.filters.ResultLengthComparator<T>
All Implemented Interfaces:
java.util.Comparator<T>

 class ResultLengthComparator<T>
extends java.lang.Object
implements java.util.Comparator<T>

The ResultLengthComparator compares two Result objects by comparing the lengths of the answer strings.

Version:
2008-02-15
Author:
Nico Schlaefer

Constructor Summary
ResultLengthComparator()
           
 
Method Summary
 int compare(java.lang.Object o1, java.lang.Object o2)
          Compares its two arguments for order.
 
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

ResultLengthComparator

ResultLengthComparator()
Method Detail

compare

public int compare(java.lang.Object o1,
                   java.lang.Object o2)
Compares its two arguments for order. Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.

Specified by:
compare in interface java.util.Comparator<T>
Parameters:
o1 - the first object to be compared
o2 - the second object to be compared
Returns:
a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second