Class 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
    • 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 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, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
    • 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>