code: public int compareTo(Object o) {
      long thisValue = this.value;
      long thatValue = ((LongWritable)o).value;
      return (thisValue<thatValue ? -1 : (thisValue==thatValue ? 0 : 1));
    }
docs: Compares two LongWritables.