/** {@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) { long key = in.readLong(); int val = in.readInt(); put(key, val); } } } // TLongIntHashMap
/** * Creates a new <code>TLongIntHashMap</code> instance containing * all of the entries in the map passed in. * * @param map a <tt>TLongIntMap</tt> that will be duplicated. */ public TLongIntHashMap( TLongIntMap map ) { super( map.size() ); if ( map instanceof TLongIntHashMap ) { TLongIntHashMap hashmap = ( TLongIntHashMap ) map; this._loadFactor = hashmap._loadFactor; this.no_entry_key = hashmap.no_entry_key; this.no_entry_value = hashmap.no_entry_value; //noinspection RedundantCast if ( this.no_entry_key != ( long ) 0 ) { Arrays.fill( _set, this.no_entry_key ); } //noinspection RedundantCast if ( this.no_entry_value != ( int ) 0 ) { Arrays.fill( _values, this.no_entry_value ); } setUp( (int) Math.ceil( DEFAULT_CAPACITY / _loadFactor ) ); } putAll( map ); }
/** {@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) { long key = in.readLong(); int val = in.readInt(); put(key, val); } } } // TLongIntHashMap
/** {@inheritDoc} */ @Override 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) { long key = in.readLong(); int val = in.readInt(); put(key, val); } } } // TLongIntHashMap
/** * Creates a new <code>TLongIntHashMap</code> instance containing * all of the entries in the map passed in. * * @param map a <tt>TLongIntMap</tt> that will be duplicated. */ public TLongIntHashMap( TLongIntMap map ) { super( map.size() ); if ( map instanceof TLongIntHashMap ) { TLongIntHashMap hashmap = ( TLongIntHashMap ) map; this._loadFactor = hashmap._loadFactor; this.no_entry_key = hashmap.no_entry_key; this.no_entry_value = hashmap.no_entry_value; //noinspection RedundantCast if ( this.no_entry_key != ( long ) 0 ) { Arrays.fill( _set, this.no_entry_key ); } //noinspection RedundantCast if ( this.no_entry_value != ( int ) 0 ) { Arrays.fill( _values, this.no_entry_value ); } setUp( (int) Math.ceil( DEFAULT_CAPACITY / _loadFactor ) ); } putAll( map ); }
/** {@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) { long key = in.readLong(); int val = in.readInt(); put(key, val); } } } // TLongIntHashMap
/** * Creates a new <code>TLongIntHashMap</code> instance containing * all of the entries in the map passed in. * * @param map a <tt>TLongIntMap</tt> that will be duplicated. */ public TLongIntHashMap( TLongIntMap map ) { super( map.size() ); if ( map instanceof TLongIntHashMap ) { TLongIntHashMap hashmap = ( TLongIntHashMap ) map; this._loadFactor = hashmap._loadFactor; this.no_entry_key = hashmap.no_entry_key; this.no_entry_value = hashmap.no_entry_value; //noinspection RedundantCast if ( this.no_entry_key != ( long ) 0 ) { Arrays.fill( _set, this.no_entry_key ); } //noinspection RedundantCast if ( this.no_entry_value != ( int ) 0 ) { Arrays.fill( _values, this.no_entry_value ); } setUp( (int) Math.ceil( DEFAULT_CAPACITY / _loadFactor ) ); } putAll( map ); }
/** {@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) { long key = in.readLong(); int val = in.readInt(); put(key, val); } } } // TLongIntHashMap
/** * Creates a new <code>TLongIntHashMap</code> instance containing * all of the entries in the map passed in. * * @param map a <tt>TLongIntMap</tt> that will be duplicated. */ public TLongIntHashMap( TLongIntMap map ) { super( map.size() ); if ( map instanceof TLongIntHashMap ) { TLongIntHashMap hashmap = ( TLongIntHashMap ) map; this._loadFactor = hashmap._loadFactor; this.no_entry_key = hashmap.no_entry_key; this.no_entry_value = hashmap.no_entry_value; //noinspection RedundantCast if ( this.no_entry_key != ( long ) 0 ) { Arrays.fill( _set, this.no_entry_key ); } //noinspection RedundantCast if ( this.no_entry_value != ( int ) 0 ) { Arrays.fill( _values, this.no_entry_value ); } setUp( (int) Math.ceil( DEFAULT_CAPACITY / _loadFactor ) ); } putAll( map ); }
/** * Creates a new <code>TLongIntHashMap</code> instance containing * all of the entries in the map passed in. * * @param map a <tt>TLongIntMap</tt> that will be duplicated. */ public TLongIntHashMap( TLongIntMap map ) { super( map.size() ); if ( map instanceof TLongIntHashMap ) { TLongIntHashMap hashmap = ( TLongIntHashMap ) map; this._loadFactor = Math.abs( hashmap._loadFactor ); this.no_entry_key = hashmap.no_entry_key; this.no_entry_value = hashmap.no_entry_value; //noinspection RedundantCast if ( this.no_entry_key != ( long ) 0 ) { Arrays.fill( _set, this.no_entry_key ); } //noinspection RedundantCast if ( this.no_entry_value != ( int ) 0 ) { Arrays.fill( _values, this.no_entry_value ); } setUp( saturatedCast( fastCeil( DEFAULT_CAPACITY / (double) _loadFactor ) ) ); } putAll( map ); }