public double remove( int key ) { synchronized( mutex ) { return m.remove( key ); } } public void putAll( Map<? extends Integer, ? extends Double> map ) {
/** * Deletes a key/value pair from the map. * * @param key an <code>Object</code> value * @return the removed value, or null if it was not found in the map */ public Double remove( Object key ) { int k; if ( key != null ) { if ( key instanceof Integer ) { k = unwrapKey( key ); } else { return null; } } else { k = _map.getNoEntryKey(); } double v = _map.remove( k ); // 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 ); } }
public double remove( int key ) { synchronized( mutex ) { return m.remove( key ); } } public void putAll( Map<? extends Integer, ? extends Double> map ) {
@Override public double remove( int key ) { synchronized( mutex ) { return m.remove( key ); } } @Override
public double remove( int key ) { synchronized( mutex ) { return m.remove( key ); } } public void putAll( Map<? extends Integer, ? extends Double> map ) {
public double remove( int key ) { synchronized( mutex ) { return m.remove( key ); } } public void putAll( Map<? extends Integer, ? extends Double> map ) {
/** * {@inheritDoc} */ public int disconnect(int vertex) { if (edges.containsKey(vertex)) { edges.remove(vertex); return 1; } return 0; }
@Override public void delete(DBIDRef id) { map.remove(DBIDUtil.asInteger(id)); }
@Override public final Double setValue(int index, Double value) { this.checkBounds(index, length); final Double oldValue = getValue(index); if (value == null || Double.compare(value, defaultValue) == 0) { this.values.remove(index); return oldValue; } else { this.values.put(index, value); return oldValue; } }
@Override public final double setDouble(int index, double value) { this.checkBounds(index, length); final double oldValue = getDouble(index); if (value == defaultValue) { this.values.remove(index); return oldValue; } else { this.values.put(index, value); return oldValue; } }
/** * Deletes a key/value pair from the map. * * @param key an <code>Object</code> value * @return the removed value, or null if it was not found in the map */ @Override public Double remove( Object key ) { if (! (key instanceof Integer ) ) { return null; } int k = unwrapKey( key ); if ( _map.containsKey( k ) ) { double v = _map.remove( k ); return wrapValue( v ); } return null; }
/** * Deletes a key/value pair from the map. * * @param key an <code>Object</code> value * @return the removed value, or null if it was not found in the map */ public Double remove( Object key ) { int k; if ( key != null ) { if ( key instanceof Integer ) { k = unwrapKey( key ); } else { return null; } } else { k = _map.getNoEntryKey(); } double v = _map.remove( k ); // 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 ); } }
/** * Deletes a key/value pair from the map. * * @param key an <code>Object</code> value * @return the removed value, or null if it was not found in the map */ public Double remove( Object key ) { int k; if ( key != null ) { if ( key instanceof Integer ) { k = unwrapKey( key ); } else { return null; } } else { k = _map.getNoEntryKey(); } double v = _map.remove( k ); // 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 ); } }
/** * {@inheritDoc} */ public boolean remove(Object o) { if (o instanceof WeightedEdge) { WeightedEdge e = (WeightedEdge)o; int toRemove = 0; if (e.to() == rootVertex) toRemove = e.from(); else if (e.from() == rootVertex) toRemove = e.to(); else return false; if (edges.containsKey(toRemove)) { edges.remove(toRemove); return true; } return false; } return false; }
/** * Deletes a key/value pair from the map. * * @param key an <code>Object</code> value * @return the removed value, or null if it was not found in the map */ public Double remove( Object key ) { int k; if ( key != null ) { if ( key instanceof Integer ) { k = unwrapKey( key ); } else { return null; } } else { k = _map.getNoEntryKey(); } double v = _map.remove( k ); // 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 ); } }