public double getNoEntryValue() { return m.getNoEntryValue(); }
public double getNoEntryValue() { return m.getNoEntryValue(); }
/** * Deletes a key/value pair from the map. * * @param key an <code>Object</code> value * @return the removed value, or Integer(0) if it was not found in the map */ public Double remove( Object key ) { double v = _map.remove( key ); // There may be a false positive since primitive maps // cannot return null, so we have to do an extra // check here. if ( v == _map.getNoEntryValue() ) { return null; } else { return wrapValue( v ); } }
/** * Retrieves the value for <tt>key</tt> * * @param key an <code>Object</code> value * @return the value of <tt>key</tt> or null if no such mapping exists. */ public Double get( Object key ) { double v = _map.get( key ); // There may be a false positive since primitive maps // cannot return null, so we have to do an extra // check here. if ( v == _map.getNoEntryValue() ) { return null; } else { return wrapValue( v ); } }
/** * Creates a new <code>TObjectDoubleHashMap</code> that contains the entries * in the map passed to it. * * @param map the <tt>TObjectDoubleMap</tt> to be copied. */ public TObjectDoubleHashMap( TObjectDoubleMap<? extends K> map ) { this( map.size(), 0.5f, map.getNoEntryValue() ); if ( map instanceof TObjectDoubleHashMap ) { TObjectDoubleHashMap hashmap = ( TObjectDoubleHashMap ) map; this._loadFactor = hashmap._loadFactor; this.no_entry_value = hashmap.no_entry_value; //noinspection RedundantCast if ( this.no_entry_value != ( double ) 0 ) { Arrays.fill( _values, this.no_entry_value ); } setUp( (int) Math.ceil( DEFAULT_CAPACITY / _loadFactor ) ); } putAll( map ); }
/** * Creates a new <code>TObjectDoubleCustomHashMap</code> that contains the entries * in the map passed to it. * * @param map the <tt>TObjectDoubleMap</tt> to be copied. */ public TObjectDoubleCustomHashMap( HashingStrategy<? super K> strategy, TObjectDoubleMap<? extends K> map ) { this( strategy, map.size(), 0.5f, map.getNoEntryValue() ); if ( map instanceof TObjectDoubleCustomHashMap ) { TObjectDoubleCustomHashMap hashmap = ( TObjectDoubleCustomHashMap ) map; this._loadFactor = hashmap._loadFactor; this.no_entry_value = hashmap.no_entry_value; this.strategy = hashmap.strategy; //noinspection RedundantCast if ( this.no_entry_value != ( double ) 0 ) { Arrays.fill( _values, this.no_entry_value ); } setUp( (int) Math.ceil( DEFAULT_CAPACITY / _loadFactor ) ); } putAll( map ); }
/** * Inserts a key/value pair into the map. * * @param key an <code>Object</code> value * @param value an <code>Double</code> value * @return the previous value associated with <tt>key</tt>, * or Integer(0) if none was found. */ public Double put( K key, Double value ) { if ( value == null ) return wrapValue( _map.put( key, _map.getNoEntryValue() ) ); return wrapValue( _map.put( key, unwrapValue( value ) ) ); }
double value = iter.value(); if ( value == no_entry_value ) { if ( !( that.get( key ) == that.getNoEntryValue() && that.containsKey( key ) ) ) {
double value = iter.value(); if ( value == no_entry_value ) { if ( !( that.get( key ) == that.getNoEntryValue() && that.containsKey( key ) ) ) {
@Override public double getNoEntryValue() { return m.getNoEntryValue(); }
public double getNoEntryValue() { return m.getNoEntryValue(); }
public double getNoEntryValue() { return m.getNoEntryValue(); }
@Override public double getNoEntryValue() { return m.getNoEntryValue(); }
public double getNoEntryValue() { return m.getNoEntryValue(); }
/** * Deletes a key/value pair from the map. * * @param key an <code>Object</code> value * @return the removed value, or Integer(0) if it was not found in the map */ public Double remove( Object key ) { double v = _map.remove( key ); // There may be a false positive since primitive maps // cannot return null, so we have to do an extra // check here. if ( v == _map.getNoEntryValue() ) { return null; } else { return wrapValue( v ); } }
/** * Retrieves the value for <tt>key</tt> * * @param key an <code>Object</code> value * @return the value of <tt>key</tt> or null if no such mapping exists. */ public Double get( Object key ) { double v = _map.get( key ); // There may be a false positive since primitive maps // cannot return null, so we have to do an extra // check here. if ( v == _map.getNoEntryValue() ) { return null; } else { return wrapValue( v ); } }
/** * Inserts a key/value pair into the map. * * @param key an <code>Object</code> value * @param value an <code>Double</code> value * @return the previous value associated with <tt>key</tt>, * or Integer(0) if none was found. */ public Double put( K key, Double value ) { if ( value == null ) return wrapValue( _map.put( key, _map.getNoEntryValue() ) ); return wrapValue( _map.put( key, unwrapValue( value ) ) ); }
/** * Inserts a key/value pair into the map. * * @param key an <code>Object</code> value * @param value an <code>Double</code> value * @return the previous value associated with <tt>key</tt>, * or Integer(0) if none was found. */ public Double put( K key, Double value ) { if ( value == null ) return wrapValue( _map.put( key, _map.getNoEntryValue() ) ); return wrapValue( _map.put( key, unwrapValue( value ) ) ); }
/** * Inserts a key/value pair into the map. * * @param key an <code>Object</code> value * @param value an <code>Double</code> value * @return the previous value associated with <tt>key</tt>, * or Integer(0) if none was found. */ public Double put( K key, Double value ) { if ( value == null ) return wrapValue( _map.put( key, _map.getNoEntryValue() ) ); return wrapValue( _map.put( key, unwrapValue( value ) ) ); }
/** * Inserts a key/value pair into the map. * * @param key an <code>Object</code> value * @param value an <code>Double</code> value * @return the previous value associated with <tt>key</tt>, * or Integer(0) if none was found. */ @Override public Double put( K key, Double value ) { if ( value == null ) return wrapValue( _map.put( key, _map.getNoEntryValue() ) ); return wrapValue( _map.put( key, unwrapValue( value ) ) ); }