public double increment(int key, double delta)
    {
        if(Double.isNaN(delta))
            throw new IllegalArgumentException("NaN is not an allowable value");
        
        if(table.length <= key)
            put(key, delta);
        else if(Double.isNaN(table[key]))
        {
            table[key] = delta;
            used++;
        }
        else
            table[key] += delta;
        
        return table[key];
    }
public double increment ( int key , double delta ) { if ( Double . isNaN ( delta ) ) throw new IllegalArgumentException ( "NaN is not an allowable value" ) ; if ( table . length <= key ) put ( key , delta ) ; else if ( Double . isNaN ( table [ key ] ) ) { table [ key ] = delta ; used ++ ; } else table [ key ] += delta ; return table [ key ] ; }
@param key the key whose associated value is to be incremented. All
non-present keys behave as having an implicit value of zero, in which
case the delta value is directly inserted into the map.
@param delta the amount by which to increment the key's stored value.
@return the new value stored for the given key