/*
(non-Javadoc)
@see java.util.Map#remove(java.lang.Object)
331489
@Override
    public V remove(Object key) {
        CachedValue<K, V> entry = map.remove(key);
        if (entry != null) {
            onValueRemove(entry);
            if (!isValueExpired(entry)) {
                return (V) entry.getValue();
            }
        }
        return null;
    }
1113609
@Override
	public boolean remove(Object o) {
		combine();
		return combined!=null && combined.remove(o);
	}
997216
public boolean remove(Object key, Object value) {
        final Object curValue = get(key);

        if (!Objects.equals(curValue, value) || (curValue == null && !containsKey(key))) {
            return false;
        }

        remove(key);

        return true;
    }
913157
public void remove(String key) {
        int i = indexOfKey(key);
        if (i != NotFound)
            remove(i);
    }
369776
@Override
    public boolean remove(Object o) {
        if (elements.remove(o)) {
            ordered.remove(o);
            return true;
        } else {
            return false;
        }

    }
175373
public Object remove(Object key)
	{
		synchronized(this)
		{
			if (size > 0) // check current size before trying remove
			{
				Object obj =  super.remove(key);
				size = super.size();
				return obj;
			}
			return null;
		}
	}
1224103
public synchronized void remove()
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "remove");

    if(removable != null)
    {
      index.remove(removable);
    }
    else
    {
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
        SibTr.exit(tc, "remove", "IllegalStateException");
      throw new IllegalStateException(
        nls.getFormattedMessage(
          "NO_ELEMENTS_ERROR_CWSIP0602",
          null,
          null));
    }

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "remove");
  }
775036
public void remove() {
        if (polygon != null) {
            polygon.remove();
            polygon = null;
        }
        for (Marker marker : markers) {
            marker.remove();
        }
        for (PolygonHoleMarkers hole : holes) {
            hole.remove();
        }
    }
259769
@Override
    public V remove(Object key) {
        if (isReadyOnly())
            throw new UnsupportedOperationException("Can't remove property from read-only dictionary");

        return this.localMap.remove(key);
    }
412323
@Override
  public <T> T remove(Object objectToRemove, String collectionName) {
    if (null == objectToRemove) {
      throw new InvalidJsonDbApiUsageException("Null Object cannot be removed from DB");
    }
    Util.ensureNotRestricted(objectToRemove);

    CollectionMetaData collectionMeta = cmdMap.get(collectionName);
    collectionMeta.getCollectionLock().writeLock().lock();
    try {
      @SuppressWarnings("unchecked")
      Map<Object, T> collection = (Map<Object, T>) collectionsRef.get().get(collectionName);
      if (null == collection) {
        throw new InvalidJsonDbApiUsageException("Collection by name '" + collectionName + "' not found. Create collection first.");
      }

      CollectionMetaData cmd = cmdMap.get(collectionName);
      Object id = Util.getIdForEntity(objectToRemove, cmd.getIdAnnotatedFieldGetterMethod());
      if (!collection.containsKey(id)) {
        throw new InvalidJsonDbApiUsageException(String.format("Objects with Id %s not found in collection %s", id, collectionName));
      }

      JsonWriter jw;
      try {
        jw = new JsonWriter(dbConfig, cmd, collectionName, fileObjectsRef.get().get(collectionName));
      } catch (IOException ioe) {
        logger.error("Failed to obtain writer for " + collectionName, ioe);
        throw new JsonDBException("Failed to save " + collectionName, ioe);
      }
      boolean substractResult = jw.removeFromJsonFile(collection, id);
      if(substractResult) {
        T objectRemoved = collection.remove(id);
        // Don't need to clone it, this object no more exists in the collection
        return objectRemoved;
      } else {
        return null;
      }
    } finally {
      collectionMeta.getCollectionLock().writeLock().unlock();
    }
  }
918412
public boolean remove(Set<?> set, Object object) {
		if (set == null || object == null) {
			return false;
		}
		
		return set.remove(object);
	}
287797
public Object remove(String key) {
        if (key != null) {
            return map.remove(key);
        }
        return null;
    }
1321182
@Override
  public V remove(Object o) {
    checkMutable();
    @SuppressWarnings("unchecked")
    final K key = (K) o;
    final int index = binarySearchInArray(key);
    if (index >= 0) {
      return removeArrayEntryAt(index);
    }
    // overflowEntries might be Collections.unmodifiableMap(), so only
    // call remove() if it is non-empty.
    if (overflowEntries.isEmpty()) {
      return null;
    } else {
      return overflowEntries.remove(key);
    }
  }
1133183
public void remove() {
        if(_mapIterator == null)
            throw new UnsupportedOperationException(Bundle.getErrorString("IteratorFactory_Iterator_removeUnsupported", new Object[]{this.getClass().getName()}));
        else _mapIterator.remove();
    }
1269632
@Override
    public Object remove(K key) {
        for (Map<K, V> bucket : buckets) {
            Object value = bucket.remove(key);
            if (value != null) {
                return value;
            }
        }
        return null;
    }
580420
public Object remove(Object key)
    {
        synchronized (_cacheL2)
        {
            if (!_cacheL1.containsKey(key) && !_cacheL2.containsKey(key))
            {
                // nothing to remove
                return null;
            }

            Object retval;
            Map newMap;
            synchronized (_cacheL1)
            {
                // "dummy" synchronization to guarantee _cacheL1 will be assigned after fully initialized
                // at least until JVM 1.5 where this should be guaranteed by the volatile keyword
                newMap = HashMapUtils.merge(_cacheL1, _cacheL2);
                retval = newMap.remove(key);
            }

            _cacheL1 = newMap;
            _cacheL2.clear();
            _missCount = 0;
            return retval;
        }
    }
544154
public synchronized void remove(@Sensitive Object key) {

        primaryTable.remove(key);
        secondaryTable.remove(key);
        tertiaryTable.remove(key);

    }