Esempio n. 1
0
  @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;
  }
Esempio n. 2
0
  @Override
  public int compareTo(TermDocIdWritable tuple) {
    int cmp = __term.compareTo(tuple.getTerm());
    if (cmp != 0) {
      return cmp;
    }

    return __documentId.compareTo(tuple.getDocumentId());
  }
Esempio n. 3
0
 public static TermDocIdWritable read(DataInput in) throws IOException {
   TermDocIdWritable tuple = new TermDocIdWritable();
   tuple.readFields(in);
   return tuple;
 }