org.terrier.structures.postings
Class PostingIdComparator

java.lang.Object
  extended by 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
PostingIdComparator()
           
 
Method Summary
 int compare(byte[] arg0, int arg1, int arg2, byte[] arg3, int arg4, int arg5)
          Decode Writable postings and compare by id
 int compare(Posting o1, Posting o2)
          Compare Posting objects by id
 
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

PostingIdComparator

public PostingIdComparator()
Method Detail

compare

public int compare(Posting o1,
                   Posting o2)
Compare Posting objects by id

Specified by:
compare in interface java.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 interface org.apache.hadoop.io.RawComparator<Posting>


Terrier 3.5. Copyright © 2004-2011 University of Glasgow