@Override public int compareTo(TermDocIdWritable tuple) { int cmp = __term.compareTo(tuple.getTerm()); if (cmp != 0) { return cmp; } return __documentId.compareTo(tuple.getDocumentId()); }
@Override public boolean equals(Object o) { if (o instanceof TermDocIdWritable) { TermDocIdWritable tuple = (TermDocIdWritable) o; return (__documentId.equals(tuple.getDocumentId()) && __term.equals(tuple.getTerm())); } return false; }