org.terrier.structures.indexing.singlepass.hadoop
Class IDComparator
java.lang.Object
org.terrier.structures.indexing.singlepass.hadoop.IDComparator
- All Implemented Interfaces:
- Comparator<String>
public class IDComparator
- extends Object
- implements Comparator<String>
Compares String objects. It is used to sort the Map ID's for the MapData files loaded
during the reduce step. It makes sure that the Map ID's are in order of the documents
that they processed.
- Since:
- 3.0
- Author:
- richardm
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IDComparator
public IDComparator(LinkedList<MapData> mapData)
- constructor
- Parameters:
mapData -
compare
public final int compare(String id1,
String id2)
-
- Specified by:
compare in interface Comparator<String>
Terrier 3.6. Copyright © 2004-2011 University of Glasgow