public void readExternal( ObjectInput in ) throws IOException, ClassNotFoundException { // VERSION in.readByte(); // SUPER super.readExternal( in ); // NO_ENTRY_VALUE no_entry_value = in.readInt(); // NUMBER OF ENTRIES int size = in.readInt(); setUp( size ); // ENTRIES while (size-- > 0) { //noinspection unchecked K key = ( K ) in.readObject(); int val = in.readInt(); put(key, val); } }
/** * Creates a new <code>TObjectIntHashMap</code> that contains the entries * in the map passed to it. * * @param map the <tt>TObjectIntMap</tt> to be copied. */ public TObjectIntHashMap( TObjectIntMap<? extends K> map ) { this( map.size(), 0.5f, map.getNoEntryValue() ); if ( map instanceof TObjectIntHashMap ) { TObjectIntHashMap hashmap = ( TObjectIntHashMap ) map; this._loadFactor = hashmap._loadFactor; this.no_entry_value = hashmap.no_entry_value; //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 ); }
/** See {@link gnu.trove.map.hash.TObjectIntHashMap#setUp(int)} */ public int setUp(int initialCapacity) { return delegate.setUp(initialCapacity); }
/** See {@link gnu.trove.map.hash.TObjectIntHashMap#setUp(int)} */ public int setUp(int initialCapacity) { return delegate.setUp(initialCapacity); }
public void readExternal( ObjectInput in ) throws IOException, ClassNotFoundException { // VERSION in.readByte(); // SUPER super.readExternal( in ); // NO_ENTRY_VALUE no_entry_value = in.readInt(); // NUMBER OF ENTRIES int size = in.readInt(); setUp( size ); // ENTRIES while (size-- > 0) { //noinspection unchecked K key = ( K ) in.readObject(); int val = in.readInt(); put(key, val); } }
public void readExternal( ObjectInput in ) throws IOException, ClassNotFoundException { // VERSION in.readByte(); // SUPER super.readExternal( in ); // NO_ENTRY_VALUE no_entry_value = in.readInt(); // NUMBER OF ENTRIES int size = in.readInt(); setUp( size ); // ENTRIES while (size-- > 0) { //noinspection unchecked K key = ( K ) in.readObject(); int val = in.readInt(); put(key, val); } }
public void readExternal( ObjectInput in ) throws IOException, ClassNotFoundException { // VERSION in.readByte(); // SUPER super.readExternal( in ); // NO_ENTRY_VALUE no_entry_value = in.readInt(); // NUMBER OF ENTRIES int size = in.readInt(); setUp( size ); // ENTRIES while (size-- > 0) { //noinspection unchecked K key = ( K ) in.readObject(); int val = in.readInt(); put(key, val); } }
@Override @SuppressWarnings("unchecked") public void readExternal( ObjectInput in ) throws IOException, ClassNotFoundException { // VERSION in.readByte(); // SUPER super.readExternal( in ); // NO_ENTRY_VALUE no_entry_value = in.readInt(); // NUMBER OF ENTRIES int size = in.readInt(); setUp( size ); // ENTRIES while (size-- > 0) { //noinspection unchecked K key = ( K ) in.readObject(); int val = in.readInt(); put(key, val); } }
/** * Creates a new <code>TObjectIntHashMap</code> that contains the entries * in the map passed to it. * * @param map the <tt>TObjectIntMap</tt> to be copied. */ public TObjectIntHashMap( TObjectIntMap<? extends K> map ) { this( map.size(), 0.5f, map.getNoEntryValue() ); if ( map instanceof TObjectIntHashMap ) { TObjectIntHashMap hashmap = ( TObjectIntHashMap ) map; this._loadFactor = hashmap._loadFactor; this.no_entry_value = hashmap.no_entry_value; //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>TObjectIntHashMap</code> that contains the entries * in the map passed to it. * * @param map the <tt>TObjectIntMap</tt> to be copied. */ @SuppressWarnings("rawtypes") public TObjectIntHashMap( TObjectIntMap<? extends K> map ) { this( map.size(), 0.5f, map.getNoEntryValue() ); if ( map instanceof TObjectIntHashMap ) { TObjectIntHashMap hashmap = ( TObjectIntHashMap ) map; this._loadFactor = hashmap._loadFactor; this.no_entry_value = hashmap.no_entry_value; //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>TObjectIntHashMap</code> that contains the entries * in the map passed to it. * * @param map the <tt>TObjectIntMap</tt> to be copied. */ public TObjectIntHashMap( TObjectIntMap<K> map ) { this( map.size(), 0.5f, map.getNoEntryValue() ); if ( map instanceof TObjectIntHashMap ) { TObjectIntHashMap hashmap = ( TObjectIntHashMap ) map; this._loadFactor = hashmap._loadFactor; this.no_entry_value = hashmap.no_entry_value; //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>TObjectIntHashMap</code> that contains the entries * in the map passed to it. * * @param map the <tt>TObjectIntMap</tt> to be copied. */ public TObjectIntHashMap( TObjectIntMap<? extends K> map ) { this( map.size(), 0.5f, map.getNoEntryValue() ); if ( map instanceof TObjectIntHashMap ) { TObjectIntHashMap hashmap = ( TObjectIntHashMap ) map; this._loadFactor = Math.abs( hashmap._loadFactor ); this.no_entry_value = hashmap.no_entry_value; //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 ); }