code: public synchronized long term() {
      Map.Entry<Long, Long> entry = terms.lastEntry();
      return entry != null ? entry.getValue() : 0;
    }
docs: Returns the highest term in the index.
  
  @return The highest term in the index.