Package it.uniroma1.lcl.babelnet.data
Class BabelExampleComparator
- java.lang.Object
-
- it.uniroma1.lcl.babelnet.data.BabelExampleComparator
-
- All Implemented Interfaces:
Comparator<BabelExample>
public class BabelExampleComparator extends Object implements Comparator<BabelExample>
Comparator
forBabelExample
s which sorts by sources.- Author:
- navigli
-
-
Constructor Summary
Constructors Constructor Description BabelExampleComparator()
Creates the example comparatorBabelExampleComparator(BabelSense mainSense)
Creates the example comparator with the sense the examples refer to
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compare(BabelExample b1, BabelExample b2)
Sort examples by language and source-
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, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
-
-
-
Constructor Detail
-
BabelExampleComparator
public BabelExampleComparator(BabelSense mainSense)
Creates the example comparator with the sense the examples refer to- Parameters:
mainSense
- the sense the examples refer to
-
BabelExampleComparator
public BabelExampleComparator()
Creates the example comparator
-
-
Method Detail
-
compare
public int compare(BabelExample b1, BabelExample b2)
Sort examples by language and source- Specified by:
compare
in interfaceComparator<BabelExample>
-
-