public synchronized void index(long offset, long term) {
    if (lookup(offset) != term) {
      terms.put(offset, term);
    }
  }
public synchronized void index ( long offset , long term ) { if ( lookup ( offset ) != term ) { terms . put ( offset , term ) ; } }
Indexes the given offset with the given term.

@param offset The offset to index.
@param term The term to index.