Package gnu.trove

Examples of gnu.trove.TLongLongHashMap$HashProcedure



public class BagIndexUtil {

  static long assignIds(Collection<EditRec> edits, long nextDocId) {
    TLongLongHashMap idMap = new TLongLongHashMap();
    for(EditRec edit : edits) {
      long docId = edit.docId;
      if (docId < 0) {
        if (idMap.contains(docId)) {
          edit.docId = idMap.get(docId);
        } else {
          long newDocId = nextDocId++;
          idMap.put(docId, newDocId);
          edit.docId = newDocId;
        }
      }
    }
    return nextDocId;
View Full Code Here


    return getRange(term, ArrayBytes.EMPTY_BYTES, ArrayBytes.EMPTY_BYTES, false, false, revNum);
  }
 
  @Override
  public long commitNewRev(Collection<EditRec> edits) {
    TLongLongHashMap idMap = new TLongLongHashMap();
    for(EditRec edit : edits) {
      long docId = edit.docId;
      if (docId < 0) {
        if (idMap.contains(docId)) {
          edit.docId = idMap.get(docId);
        } else {
          long newDocId = nextDocId++;
          idMap.put(docId, newDocId);
          edit.docId = newDocId;
        }
      }
    }
    TokenTable newTokenTable = applyEditsToTokenTable(edits, getRootTokenTable(topRevNum));
View Full Code Here

TOP

Related Classes of gnu.trove.TLongLongHashMap$HashProcedure

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.