Package org.terrier.structures.postings
Class PostingIdComparator
- java.lang.Object
-
- org.terrier.structures.postings.PostingIdComparator
-
- All Implemented Interfaces:
java.io.Serializable
,java.util.Comparator<Posting>
,org.apache.hadoop.io.RawComparator<Posting>
public class PostingIdComparator extends java.lang.Object implements java.util.Comparator<Posting>, org.apache.hadoop.io.RawComparator<Posting>, java.io.Serializable
A comparator object for Posting objects, where they are sorted by id.- Since:
- 3.0
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description PostingIdComparator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compare(byte[] arg0, int arg1, int arg2, byte[] arg3, int arg4, int arg5)
Decode Writable postings and compare by idint
compare(Posting o1, Posting o2)
Compare Posting objects by id
-
-
-
Method Detail
-
compare
public int compare(Posting o1, Posting o2)
Compare Posting objects by id- Specified by:
compare
in interfacejava.util.Comparator<Posting>
-
compare
public int compare(byte[] arg0, int arg1, int arg2, byte[] arg3, int arg4, int arg5)
Decode Writable postings and compare by id- Specified by:
compare
in interfaceorg.apache.hadoop.io.RawComparator<Posting>
-
-