/** * Creates a new <code>TIntIntHashMap</code> instance containing * all of the entries in the map passed in. * * @param map a <tt>TIntIntMap</tt> that will be duplicated. */ public TIntIntHashMap( TIntIntMap map ) { super( map.size() ); if ( map instanceof TIntIntHashMap ) { TIntIntHashMap hashmap = ( TIntIntHashMap ) 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 != ( int ) 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 ); }
/** See {@link gnu.trove.map.hash.TIntIntHashMap#putAll(TIntIntMap)} */ public void putAll(TIntIntMap map) { delegate.putAll(map); }
/** See {@link gnu.trove.map.hash.TIntIntHashMap#putAll(Map)} */ public void putAll(Map<? extends Integer, ? extends Integer> map) { delegate.putAll(map); }
/** See {@link gnu.trove.map.hash.TIntIntHashMap#putAll(TIntIntMap)} */ public void putAll(TIntIntMap map) { delegate.putAll(map); }
/** See {@link gnu.trove.map.hash.TIntIntHashMap#putAll(Map)} */ public void putAll(Map<? extends Integer, ? extends Integer> map) { delegate.putAll(map); }
@Override @SuppressWarnings("squid:S2975") // Must override clone public Object clone() throws CloneNotSupportedException { TIntIntHashMap m = (TIntIntHashMap) super.clone(); m.delegate = new gnu.trove.map.hash.TIntIntHashMap(); m.delegate.putAll(delegate); return m; }
@Override @SuppressWarnings("squid:S2975") // Must override clone public Object clone() throws CloneNotSupportedException { TIntIntHashMap m = (TIntIntHashMap) super.clone(); m.delegate = new gnu.trove.map.hash.TIntIntHashMap(); m.delegate.putAll(delegate); return m; }
/** * Creates a new <code>TIntIntHashMap</code> instance containing * all of the entries in the map passed in. * * @param map a <tt>TIntIntMap</tt> that will be duplicated. */ public TIntIntHashMap( TIntIntMap map ) { super( map.size() ); if ( map instanceof TIntIntHashMap ) { TIntIntHashMap hashmap = ( TIntIntHashMap ) 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 != ( int ) 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>TIntIntHashMap</code> instance containing * all of the entries in the map passed in. * * @param map a <tt>TIntIntMap</tt> that will be duplicated. */ public TIntIntHashMap( TIntIntMap map ) { super( map.size() ); if ( map instanceof TIntIntHashMap ) { TIntIntHashMap hashmap = ( TIntIntHashMap ) 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 != ( int ) 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>TIntIntHashMap</code> instance containing * all of the entries in the map passed in. * * @param map a <tt>TIntIntMap</tt> that will be duplicated. */ public TIntIntHashMap( TIntIntMap map ) { super( map.size() ); if ( map instanceof TIntIntHashMap ) { TIntIntHashMap hashmap = ( TIntIntHashMap ) 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 != ( int ) 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>TIntIntHashMap</code> instance containing * all of the entries in the map passed in. * * @param map a <tt>TIntIntMap</tt> that will be duplicated. */ public TIntIntHashMap( TIntIntMap map ) { super( map.size() ); if ( map instanceof TIntIntHashMap ) { TIntIntHashMap hashmap = ( TIntIntHashMap ) 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 != ( int ) 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 ); }