/** * Creates a new <code>TIntLongHashMap</code> instance containing * all of the entries in the map passed in. * * @param keys a <tt>int</tt> array containing the keys for the matching values. * @param values a <tt>long</tt> array containing the values. */ public TIntLongHashMap( int[] keys, long[] values ) { super( Math.max( keys.length, values.length ) ); int size = Math.min( keys.length, values.length ); for ( int i = 0; i < size; i++ ) { this.put( keys[i], values[i] ); } }
/** {@inheritDoc} */ public void putAll( Map<? extends Integer, ? extends Long> map ) { ensureCapacity( map.size() ); // could optimize this for cases when map instanceof THashMap for ( Map.Entry<? extends Integer, ? extends Long> entry : map.entrySet() ) { this.put( entry.getKey().intValue(), entry.getValue().longValue() ); } }
/** {@inheritDoc} */ public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { // VERSION in.readByte(); // SUPER super.readExternal( in ); // NUMBER OF ENTRIES int size = in.readInt(); setUp( size ); // ENTRIES while (size-- > 0) { int key = in.readInt(); long val = in.readLong(); put(key, val); } } } // TIntLongHashMap
if (req.contains(x31, y31, x31, y31)) { long d = Math.abs(req.x - x31) + Math.abs(req.y - y31); offsets.put(shift, d);
/** {@inheritDoc} */ public void putAll( TIntLongMap map ) { ensureCapacity( map.size() ); TIntLongIterator iter = map.iterator(); while ( iter.hasNext() ) { iter.advance(); this.put( iter.key(), iter.value() ); } }
TIntLongHashMap mp = new TIntLongHashMap(); for (int j = 0; j < list.size(); j++) { mp.put(list.get(j), listContainer.get(j));
@Override public long set(int key, long value) { return data.put(key, value); }
/** * Creates a new <code>TIntLongHashMap</code> instance containing * all of the entries in the map passed in. * * @param keys a <tt>int</tt> array containing the keys for the matching values. * @param values a <tt>long</tt> array containing the values. */ public TIntLongHashMap( int[] keys, long[] values ) { super( Math.max( keys.length, values.length ) ); int size = Math.min( keys.length, values.length ); for ( int i = 0; i < size; i++ ) { this.put( keys[i], values[i] ); } }
/** {@inheritDoc} */ public void putAll( Map<? extends Integer, ? extends Long> map ) { ensureCapacity( map.size() ); // could optimize this for cases when map instanceof THashMap for ( Map.Entry<? extends Integer, ? extends Long> entry : map.entrySet() ) { this.put( entry.getKey().intValue(), entry.getValue().longValue() ); } }
/** {@inheritDoc} */ @Override public void putAll( Map<? extends Integer, ? extends Long> map ) { ensureCapacity( map.size() ); // could optimize this for cases when map instanceof THashMap for ( Map.Entry<? extends Integer, ? extends Long> entry : map.entrySet() ) { this.put( entry.getKey().intValue(), entry.getValue().longValue() ); } }
/** {@inheritDoc} */ public void putAll( Map<? extends Integer, ? extends Long> map ) { ensureCapacity( map.size() ); // could optimize this for cases when map instanceof THashMap for ( Map.Entry<? extends Integer, ? extends Long> entry : map.entrySet() ) { this.put( entry.getKey().intValue(), entry.getValue().longValue() ); } }
/** {@inheritDoc} */ public void putAll( Map<? extends Integer, ? extends Long> map ) { ensureCapacity( map.size() ); // could optimize this for cases when map instanceof THashMap for ( Map.Entry<? extends Integer, ? extends Long> entry : map.entrySet() ) { this.put( entry.getKey().intValue(), entry.getValue().longValue() ); } }
@Override public SparseLongArray reverse() { //TODO: this could be more efficient and avoid the copy TIntLongHashMap tmp = new TIntLongHashMap(data.size()); for (Entry e : entries()) tmp.put(length - e.index, e.value); this.data = tmp; return this; } }
private void decompressBuffer(RegistryReceiveBuffer buffer) { long previousUid = lastRegistryUid.put(buffer.getRegistryID(), buffer.getUid()); updateDebugVariables(buffer, previousUid); registryDecompressor.decompressSegment(buffer, parser.getVariableOffset(buffer.getRegistryID())); }
/** {@inheritDoc} */ @Override public void putAll( TIntLongMap map ) { ensureCapacity( map.size() ); TIntLongIterator iter = map.iterator(); while ( iter.hasNext() ) { iter.advance(); this.put( iter.key(), iter.value() ); } }
/** {@inheritDoc} */ public void putAll( TIntLongMap map ) { ensureCapacity( map.size() ); TIntLongIterator iter = map.iterator(); while ( iter.hasNext() ) { iter.advance(); this.put( iter.key(), iter.value() ); } }
/** {@inheritDoc} */ public void putAll( TIntLongMap map ) { ensureCapacity( map.size() ); TIntLongIterator iter = map.iterator(); while ( iter.hasNext() ) { iter.advance(); this.put( iter.key(), iter.value() ); } }
/** {@inheritDoc} */ public void putAll( TIntLongMap map ) { ensureCapacity( map.size() ); TIntLongIterator iter = map.iterator(); while ( iter.hasNext() ) { iter.advance(); this.put( iter.key(), iter.value() ); } }
@SubscribeEvent public void onJump(LivingEvent.LivingJumpEvent evt) { if (evt.getEntityLiving() instanceof EntityPlayer && evt.getEntityLiving().getEntityWorld().isRemote) { lastJumpTracker.put(evt.getEntityLiving().getEntityId(), evt.getEntityLiving().getEntityWorld().getTotalWorldTime()); } }