Codota Logo
TLongObjectHashMap.put
Code IndexAdd Codota to your IDE (free)

How to use
put
method
in
gnu.trove.map.hash.TLongObjectHashMap

Best Java code snippets using gnu.trove.map.hash.TLongObjectHashMap.put (Showing top 20 results out of 315)

  • Common ways to obtain TLongObjectHashMap
private void myMethod () {
TLongObjectHashMap t =
  • Codota Iconnew TLongObjectHashMap<>()
  • Smart code suggestions by Codota
}
origin: alibaba/mdrill

  public boolean execute( long key, V value) {
    put( key, value );
    return true;
  }
};
origin: FudanNLP/fnlp

public void set(long index, T value)	{
  vector.put(index, value);
}

origin: FudanNLP/fnlp

public void set(long index, T value)	{
  vector.put(index, value);
}

origin: alibaba/mdrill

/** {@inheritDoc} */
public void putAll( Map<? extends Long, ? extends V> map ) {
  Set<? extends Map.Entry<? extends Long,? extends V>> set = map.entrySet();
  for ( Map.Entry<? extends Long,? extends V> entry : set ) {
    put( entry.getKey(), entry.getValue() );
  }
}
origin: osmandapp/Osmand

private long addObject(T object, long tile) {
  if(!objects.containsKey(tile)){
    objects.put(tile, new ArrayList<T>());
  }
  objects.get(tile).add(object);
  return tile;
}
origin: osmandapp/Osmand

public void loadAllObjects(final List<RouteDataObject> toFillIn, RoutingContext ctx, TLongObjectHashMap<RouteDataObject> excludeDuplications) {
  if(routes != null) {
    Iterator<RouteSegment> it = routes.valueCollection().iterator();
    while(it.hasNext()){
      RouteSegment rs = it.next();
      while(rs != null){
        RouteDataObject ro = rs.road;
        if (!excludeDuplications.contains(ro.id)) {
          excludeDuplications.put(ro.id, ro);
          toFillIn.add(ro);
        }
        rs = rs.next;
      }
    }
  } else if(searchResult != null) {
    RouteDataObject[] objects = searchResult.objects;
    if(objects != null) {
      for(RouteDataObject ro : objects) {
        if (ro != null && !excludeDuplications.contains(ro.id)) {
          excludeDuplications.put(ro.id, ro);
          toFillIn.add(ro);
        }
      }
    }
  }
}

origin: alibaba/mdrill

@SuppressWarnings({"unchecked"})
public void readExternal( ObjectInput in )
  throws IOException, ClassNotFoundException {
  // VERSION
  in.readByte();
  // SUPER
  super.readExternal( in );
  // NO_ENTRY_KEY
  no_entry_key = in.readLong();
  // NUMBER OF ENTRIES
  int size = in.readInt();
  setUp( size );
  // ENTRIES
  while (size-- > 0) {
    long key = in.readLong();
    V val = (V) in.readObject();
    put(key, val);
  }
}
origin: osmandapp/Osmand

private List<TransportRouteSegment> loadNativeTransportStops(int sx, int sy, boolean change, List<TransportRouteSegment> res) throws IOException {
  long nanoTime = System.nanoTime();
  int d = change ? walkChangeRadiusIn31 : walkRadiusIn31;
  int lx = (sx - d ) >> (31 - cfg.ZOOM_TO_LOAD_TILES);
  int rx = (sx + d ) >> (31 - cfg.ZOOM_TO_LOAD_TILES);
  int ty = (sy - d ) >> (31 - cfg.ZOOM_TO_LOAD_TILES);
  int by = (sy + d ) >> (31 - cfg.ZOOM_TO_LOAD_TILES);
  for(int x = lx; x <= rx; x++) {
    for(int y = ty; y <= by; y++) {
      int tileId = x << (cfg.ZOOM_TO_LOAD_TILES + 1) + y;
      List<TransportRouteSegment> list = quadTree.get(tileId);
      if(list == null) {
        list = loadTile(x, y);
        quadTree.put(tileId, list);
      }
      for(TransportRouteSegment r : list) {
        TransportStop st = r.getStop(r.segStart);
        if (Math.abs(st.x31 - sx) > walkRadiusIn31 || Math.abs(st.y31 - sy) > walkRadiusIn31) {
          wrongLoadedWays++;
        } else {
          loadedWays++;
          res.add(r);
        }
      }
    }
  }
  loadTime += System.nanoTime() - nanoTime;
  return res;
}
origin: osmandapp/Osmand

private void getAllObjects(long tileId, final List<RouteDataObject> toFillIn, TLongObjectHashMap<RouteDataObject> excludeDuplications) {
  if (tileRoutes.containsKey(tileId)) {
    List<RouteDataObject> routes = tileRoutes.get(tileId);
    if (routes != null) {
      for (RouteDataObject ro : routes) {
        if (!excludeDuplications.contains(ro.id)) {
          excludeDuplications.put(ro.id, ro);
          toFillIn.add(ro);
        }
      }
    }
  }
  List<RoutingSubregionTile> subregions = indexedSubregions.get(tileId);
  if (subregions != null) {
    for (RoutingSubregionTile rs : subregions) {
      rs.loadAllObjects(toFillIn, this, excludeDuplications);
    }
  }
}

origin: opentripplanner/OpenTripPlanner

if (createIfEmpty && bin == null) {
  bin = new ArrayList<>();
  bins.put(mapKey, bin);
  nBins++;
origin: osmandapp/Osmand

long hash = (((long) x) << SearchRequest.ZOOM_TO_SEARCH_POI) + y;
if (!zooms.containsKey(hash)) {
  zooms.put(hash, new LinkedList<Location>());
origin: osmandapp/Osmand

indexedSubregions.put(tileId, collection);
origin: osmandapp/Osmand

  prev.next = ri;
} else {
  restrictions.put(from, ri);
origin: osmandapp/Osmand

endSegments.put(s.getId(), s);
ctx.visitedSegments.put(segment.getId(), segment);
if (segment.getDepth() > ctx.cfg.maxNumberOfChanges) {
  continue;
  ctx.visitedSegments.put(segmentId, segment);
  TransportStop stop = segment.getStop(ind);
origin: osmandapp/Osmand

RouteDataObject toCmp = excludeDuplications.get(calcRouteId(ro, segment.getSegmentStart()));
if (toCmp == null || toCmp.getPointsLength() < ro.getPointsLength()) {
  excludeDuplications.put(calcRouteId(ro, segment.getSegmentStart()), ro);
  RouteSegment s = new RouteSegment(ro, segment.getSegmentStart());
  s.next = original;
        segment.next = original;
        original = segment;
        excludeDuplications.put(calcRouteId(ro, i), ro);
origin: osmandapp/Osmand

  continue;
excludeDuplications.put(id, ro);
RouteSegment segment = new RouteSegment(ro, i);
segment.next = original;
origin: osmandapp/Osmand

for(TransportStop s : stops) {
  if(!loadedTransportStops.contains(s.getId())) {
    loadedTransportStops.put(s.getId(), s);
    allPoints.addAll(s.getReferencesToRoutes());
origin: mapsforge/mapsforge

@Override
public void addRelation(Relation relation) {
  super.addRelation(relation);
  TDRelation tdRelation = TDRelation.fromRelation(relation, this, this.preferredLanguages);
  if (tdRelation != null) {
    this.multipolygons.put(relation.getId(), tdRelation);
  }
}
origin: mapsforge/mapsforge

@Override
public void addWay(Way way) {
  super.addWay(way);
  TDWay tdWay = TDWay.fromWay(way, this, this.preferredLanguages);
  if (tdWay == null) {
    return;
  }
  this.ways.put(tdWay.getId(), tdWay);
  this.maxWayID = Math.max(this.maxWayID, way.getId());
  prepareImplicitWayRelations(tdWay);
}
origin: osmandapp/Osmand

visitedSegments.put(calculateRoutePointId(segment.getRoad(), segment.isPositive() ? segmentPoint - 1 : segmentPoint,
    segment.isPositive()), previous != null ? previous : segment);
final int x = road.getPoint31XTile(segmentPoint);
gnu.trove.map.hashTLongObjectHashMapput

Javadoc

Popular methods of TLongObjectHashMap

  • <init>
    Creates a new TLongObjectHashMap that contains the entries in the map passed to it.
  • get
  • size
  • contains
  • iterator
  • remove
  • containsKey
  • forEachEntry
  • putAll
  • valueCollection
  • clear
  • doPut
  • clear,
  • doPut,
  • forEach,
  • index,
  • postInsertHook,
  • reenableAutoCompaction,
  • removeAt,
  • setUp,
  • tempDisableAutoCompaction

Popular in Java

  • Reading from database using SQL prepared statement
  • requestLocationUpdates (LocationManager)
  • compareTo (BigDecimal)
    Compares this BigDecimal with the specified BigDecimal. Two BigDecimal objects that are equal in val
  • getExternalFilesDir (Context)
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • ArrayList (java.util)
    Resizable-array implementation of the List interface. Implements all optional list operations, and p
  • ConcurrentHashMap (java.util.concurrent)
    A hash table supporting full concurrency of retrievals and adjustable expected concurrency for updat
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • JButton (javax.swing)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now