/** * Creates a new <code>TObjectLongHashMap</code> that contains the entries * in the map passed to it. * * @param map the <tt>TObjectLongMap</tt> to be copied. */ public TObjectLongHashMap( TObjectLongMap<? extends K> map ) { this( map.size(), 0.5f, map.getNoEntryValue() ); if ( map instanceof TObjectLongHashMap ) { TObjectLongHashMap hashmap = ( TObjectLongHashMap ) map; this._loadFactor = hashmap._loadFactor; this.no_entry_value = hashmap.no_entry_value; //noinspection RedundantCast if ( this.no_entry_value != ( long ) 0 ) { Arrays.fill( _values, this.no_entry_value ); } setUp( (int) Math.ceil( DEFAULT_CAPACITY / _loadFactor ) ); } putAll( map ); }
/** * Creates a new <code>TObjectLongHashMap</code> that contains the entries * in the map passed to it. * * @param map the <tt>TObjectLongMap</tt> to be copied. */ public TObjectLongHashMap( TObjectLongMap<? extends K> map ) { this( map.size(), 0.5f, map.getNoEntryValue() ); if ( map instanceof TObjectLongHashMap ) { TObjectLongHashMap hashmap = ( TObjectLongHashMap ) map; this._loadFactor = hashmap._loadFactor; this.no_entry_value = hashmap.no_entry_value; //noinspection RedundantCast if ( this.no_entry_value != ( long ) 0 ) { Arrays.fill( _values, this.no_entry_value ); } setUp( (int) Math.ceil( DEFAULT_CAPACITY / _loadFactor ) ); } putAll( map ); }
/** * Creates a new <code>TObjectLongHashMap</code> that contains the entries * in the map passed to it. * * @param map the <tt>TObjectLongMap</tt> to be copied. */ @SuppressWarnings("rawtypes") public TObjectLongHashMap( TObjectLongMap<? extends K> map ) { this( map.size(), 0.5f, map.getNoEntryValue() ); if ( map instanceof TObjectLongHashMap ) { TObjectLongHashMap hashmap = ( TObjectLongHashMap ) map; this._loadFactor = hashmap._loadFactor; this.no_entry_value = hashmap.no_entry_value; //noinspection RedundantCast if ( this.no_entry_value != ( long ) 0 ) { Arrays.fill( _values, this.no_entry_value ); } setUp( (int) Math.ceil( DEFAULT_CAPACITY / _loadFactor ) ); } putAll( map ); }
/** * Creates a new <code>TObjectLongHashMap</code> that contains the entries * in the map passed to it. * * @param map the <tt>TObjectLongMap</tt> to be copied. */ public TObjectLongHashMap( TObjectLongMap<K> map ) { this( map.size(), 0.5f, map.getNoEntryValue() ); if ( map instanceof TObjectLongHashMap ) { TObjectLongHashMap hashmap = ( TObjectLongHashMap ) map; this._loadFactor = hashmap._loadFactor; this.no_entry_value = hashmap.no_entry_value; //noinspection RedundantCast if ( this.no_entry_value != ( long ) 0 ) { Arrays.fill( _values, this.no_entry_value ); } setUp( (int) Math.ceil( DEFAULT_CAPACITY / _loadFactor ) ); } putAll( map ); }
/** * Creates a new <code>TObjectLongHashMap</code> that contains the entries * in the map passed to it. * * @param map the <tt>TObjectLongMap</tt> to be copied. */ public TObjectLongHashMap( TObjectLongMap<? extends K> map ) { this( map.size(), 0.5f, map.getNoEntryValue() ); if ( map instanceof TObjectLongHashMap ) { TObjectLongHashMap hashmap = ( TObjectLongHashMap ) map; this._loadFactor = Math.abs( hashmap._loadFactor ); this.no_entry_value = hashmap.no_entry_value; //noinspection RedundantCast if ( this.no_entry_value != ( long ) 0 ) { Arrays.fill( _values, this.no_entry_value ); } setUp( saturatedCast( fastCeil( DEFAULT_CAPACITY / (double) _loadFactor ) ) ); } putAll( map ); }