/** * Checks for the present of <tt>key</tt> in the keys of the map. * * @param key an <code>Object</code> value * @return a <code>boolean</code> value */ @Override // GemStoneAddition public boolean containsKey(Object key) { return _map.containsKey(unwrapKey(key)); }
int k = unwrapKey(key); double v = unwrapValue(val); if (_map.containsKey(k) && v == _map.get(k)) {
/** * 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. */ @Override // GemStoneAddition public Object get(Object key) { int k = unwrapKey(key); double v = _map.get(k); // 0 may be a false positive since primitive maps // cannot return null, so we have to do an extra // check here. if (v == 0) { return _map.containsKey(k) ? wrapValue(v) : null; } else { return wrapValue(v); } }