Package gnu.trove

Examples of gnu.trove.THashMap


  public WeakHashMap(int initialCapacity) {
    myMap = new THashMap(initialCapacity);
  }

  public WeakHashMap() {
    myMap = new THashMap();
  }
View Full Code Here


  }

  public <T> void put(@NotNull Key<T> key, Object element, T value) {
    Map map = (Map)myMap.get(key);
    if (map == null) {
      map = new THashMap();
      myMap.put(key, map);
    }
    map.put(element, value);
  }
View Full Code Here

  }

  private void setupLabel2Var ()
  {
    idx2var = new Variable [lblseq.size ()][];
    var2label = new THashMap ();
    for (int t = 0; t < lblseq.size (); t++) {
      Labels lbls = lblseq.getLabels (t);
      idx2var[t] = new Variable [lbls.size ()];
      for (int j = 0; j < lbls.size (); j++) {
        Label lbl = lbls.get (j);
View Full Code Here

/* 186 */           theirs.put(o, o);
/*     */         }
/*     */       }
/*     */
/*     */       public void ours() {
/* 191 */         Map ours = new THashMap(Main.dataset.size());
/* 192 */         for (Iterator i = Main.dataset.iterator(); i.hasNext(); ) {
/* 193 */           Object o = i.next();
/* 194 */           ours.put(o, o);
/*     */         }
/*     */       }
/*     */
/*     */       public String toString() {
/* 199 */         return "compares " + Main.dataset.size() + " Map.put() operations";
View Full Code Here

/*     */       } } ;
/*     */   }
/*     */
/*     */   static Operation getIterationOp() {
/* 209 */     Map theirMap = new HashMap(dataset.size());
/* 210 */     Map ourMap = new THashMap(dataset.size());
/* 211 */     for (Iterator i = dataset.iterator(); i.hasNext(); ) {
/* 212 */       Object o = i.next();
/* 213 */       theirMap.put(o, o);
/* 214 */       ourMap.put(o, o);
/*     */     }
/*     */
/* 217 */     return new Operation(theirMap, ourMap) { private final Map val$theirMap;
/*     */       private final Map val$ourMap;
/*     */
View Full Code Here

/*     */       } } ;
/*     */   }
/*     */
/*     */   static Operation getIterationWithHasNextOp() {
/* 245 */     Map theirMap = new HashMap(dataset.size());
/* 246 */     Map ourMap = new THashMap(dataset.size());
/* 247 */     for (Iterator i = dataset.iterator(); i.hasNext(); ) {
/* 248 */       Object o = i.next();
/* 249 */       theirMap.put(o, o);
/* 250 */       ourMap.put(o, o);
/*     */     }
/*     */
/* 253 */     return new Operation(theirMap, ourMap) { private final Map val$theirMap;
/*     */       private final Map val$ourMap;
/*     */
View Full Code Here

/*     */   static class TroveMapCreator
/*     */     implements MemoryUsage.Creator
/*     */   {
/*     */     public Object create()
/*     */     {
/* 156 */       THashMap map = new THashMap();
/* 157 */       for (int i = 0; i < 1000; i++) {
/* 158 */         Integer x = new Integer(i);
/* 159 */         map.put(x, x);
/*     */       }
/* 161 */       return map;
/*     */     }
View Full Code Here

      myMap.remove(wk);
    }
  }

  public WeakHashMap(int initialCapacity, float loadFactor) {
    myMap = new THashMap(initialCapacity, loadFactor);
  }
View Full Code Here

  public WeakHashMap(int initialCapacity, float loadFactor) {
    myMap = new THashMap(initialCapacity, loadFactor);
  }

  public WeakHashMap(int initialCapacity) {
    myMap = new THashMap(initialCapacity);
  }
View Full Code Here

  public WeakHashMap(int initialCapacity) {
    myMap = new THashMap(initialCapacity);
  }

  public WeakHashMap() {
    myMap = new THashMap();
  }
View Full Code Here

TOP

Related Classes of gnu.trove.THashMap

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.