/*
taking out value of a particular key in the hashmap
i.e checking for required =1 options
550421
private Vector getValue(HashMap checkOptions) {
        Iterator It = checkOptions.keySet().iterator();
        Vector<String> vec = new Vector<String>();
        while (It.hasNext()) {
            String str = It.next().toString();
            OptionSpec oSpec = (OptionSpec) checkOptions.get(str);
            if (oSpec.getOptionRequired() == 1) {
                vec.add(str);
            }
        }
        return vec;
    }
1342594
@Override
  public V remove(Object key)
  {
    if (key == null) {
      V value = _nullValue;
      _nullValue = null;
      return value;
    }

    int hash = key.hashCode() & _mask;
    int count = _size + 1;

    V item = null;

    for (; count > 0; count--) {
      item = _values[hash];

      if (item == null)
        return null;

      if (_keys[hash].equals(key)) {
        _keys[hash] = null;
        _values[hash] = null;
        _size--;

        refillEntries(hash);
        break;
      }

      hash = (hash + 1) & _mask;
    }

    if (count < 0)
      throw new RuntimeException("internal cache error");

    return item;
  }
966575
public Optional<Integer> getInteger(String key) {
        Objects.requireNonNull(key, Required.KEY.toString());

        String value = this.values.get(key);
        if (StringUtils.isNotBlank(value) && NumberUtils.isCreatable(value)) {
            return Optional.of(Integer.valueOf(value));
        }

        return Optional.empty();
    }
689583
@Override
  public HamtPMap<K, V> minus(K key) {
    return !isEmpty() ? minus(key, hash(key), null) : this;
  }
454847
@Override
    public final Integer optInt(final String key) {
        final int result = this.obj.optInt(key, Integer.MIN_VALUE);
        return result == Integer.MIN_VALUE ? null : result;
    }
412836
public K removeValue(V _val) {
        checkParms(_val);
        K removedKey = inverseMap.remove(_val);
        if (removedKey != null) {
            map.remove(removedKey);
        }
        return removedKey;
    }
920311
public T remove(final int key) {
		int index = ((key & 0x7FFFFFFF) % elementKeys.length);

		int entry = elementKeys[index];
		if (key == entry) {
			final T oldvalue = elementValues[index];
			elementKeys[index] = Integer.MIN_VALUE;
			elementValues[index] = null;
			elementCount--;
			return oldvalue;
		}
		return null;
	}
599593
@Override
    public V remove(Object key) {
        int index = key == null ? indexOfNull() : indexOf(key, key.hashCode());
        if (index >= 0) {
            return removeAt(index);
        }

        return null;
    }
1363043
public long get(K key)
  {
    if (key == null)
      return _nullValue;

    int hash = key.hashCode() & _mask;

    while (true) {
      K mapKey = _keys[hash];

      if (mapKey == key)
        return _values[hash];
      else if (mapKey == null) {
        if ((_flags[hash] & DELETED) == 0)
          return NULL;
      }
      else if (mapKey.equals(key))
        return _values[hash];

      hash = (hash + 1) & _mask;
    }
  }
1325396
private void getSingleValue(Method method, Object object, Map<String, String> map)
   {
      Object value;
      try
      {
         value = filterValue(method.invoke(object));
      }
      catch (Exception ex)
      {
         value = ex.toString();
      }

      if (value != null)
      {
         map.put(getPropertyName(method), String.valueOf(value));
      }
   }
1119287
function (key) {
            var modelVal = this.getModelVal();
            modelVal = this.multiple ? modelVal : [modelVal];
            return (_.indexOf(_.map(modelVal, toStr), toStr(key)) > -1);
        }
543755
function hmset(key /* field-1, value-1, field-N, value-N, req */) {
  var args = slice.call(arguments, 1)
    , req = typeof args[args.length - 1] === 'object'
        ? args.pop() : null
    , val = this.getKey(key, req)
    , i;

  if(!val) {
    val = new HashMap();
    this.setKey(key, val, undefined, undefined, undefined, req);
  }
  for(i = 0;i < args.length;i+=2) {
    val.setKey(args[i], args[i + 1]);
  }
  return OK;
}
497127
private String getValue(String key, String previousValue) {
        final String value;
        final String valueUpdated = toSave.getProperty(key);
        if (valueUpdated == null) {
            value = previousValue;
        } else {
            value = valueUpdated;
        }
        return value;
    }
755391
@Override
    public V replace(K key, V value) {
        int hash = hash(key);
        if (value == null) {
          throw new NullPointerException();
        }
        Segment<K,V> s = segmentForHash(hash);
        return s == null ? null : s.replace(key, hash, value);
    }
1147453
function (key, value) {
            var self = this,
                _queryMap,
                currentValue;
            if (typeof key == 'string') {
                parseQuery(self);
                _queryMap = self._queryMap;
                currentValue = _queryMap[key];
                if (currentValue === undefined) {
                    currentValue = value;
                } else {
                    currentValue = [].concat(currentValue).concat(value);
                }
                _queryMap[key] = currentValue;
            } else {
                if (key instanceof Query) {
                    key = key.get();
                }
                for (var k in key) {
                    self.add(k, key[k]);
                }
            }
            return self;
        }
157975
private V putImpl(K key, V value)
  {
    V item = null;

    int hash = key.hashCode() & _mask;
    int count = _values.length;

    for (; count > 0; count--) {
      item = _values[hash];

      // No matching item, so create one
      if (item == null) {
        _keys[hash] = key;
        _values[hash] = value;
        _size++;

        return null;
      }

      // matching item gets replaced
      if (_keys[hash].equals(key)) {
        _values[hash] = value;

        return item;
      }

      hash = (hash + 1) & _mask;
    }

    throw new IllegalStateException();
  }
1166254
public static <K, V, M extends Map<K, V>> Optional<V> getOptional(M map,
            K key) {
        return Optional.ofNullable(map).map(m -> m.get(key));
    }