Removes the least recently used mapping(s) from this map.
<p>
How many mappings are removed from the map, is controlled by the
trim factor.
In any case, at least one mapping will be removed.

@see #getTrimFactor()
970242
public void removeLRU() {
        int removeCount = (int) Math.max((size() * trimFactor), 1);

        Iterator<Map.Entry<K, V>> entries = entrySet().iterator();
        while ((removeCount--) > 0 && entries.hasNext()) {
            entries.next();
            entries.remove();
        }
    }
1100705
private Map<String, Object> removeUnusedMapEntries(
            AtlasVertex instanceVertex, String propertyName,
            Map<String, Object> currentMap,
            Map<String, Object> newMap, IDataType elementType,
            AttributeInfo attributeInfo)
                    throws AtlasException {

        Map<String, Object> additionalMap = new HashMap<>();
        for (String currentKey : currentMap.keySet()) {

            boolean shouldDeleteKey = !newMap.containsKey(currentKey);
            if (GraphHelper.isReference(elementType)) {

                //Delete the edge reference if its not part of new edges created/updated
                AtlasEdge currentEdge = (AtlasEdge)currentMap.get(currentKey);

                if (!newMap.values().contains(currentEdge)) {

                    boolean deleted =
                            deleteHandler.deleteEdgeReference(currentEdge, elementType.getTypeCategory(), attributeInfo.isComposite, true);
                    if (!deleted) {
                        additionalMap.put(currentKey, currentEdge);
                        shouldDeleteKey = false;
                    }
                }
            }

            if (shouldDeleteKey) {
                String propertyNameForKey = GraphHelper.getQualifiedNameForMapKey(propertyName, currentKey);
                GraphHelper.setProperty(instanceVertex, propertyNameForKey, null);
            }
        }
        return additionalMap;
    }
1307079
public void setMajorTickMarkWidthFactor(final double FACTOR) {
        if (null == majorTickMarkWidthFactor) {
            _majorTickMarkWidthFactor = Helper.clamp(0.0, 1.0, FACTOR);
            fireUpdateEvent(REDRAW_EVENT);
        } else {
            majorTickMarkWidthFactor.set(FACTOR);
        }
    }
1322629
private void removeDuplicates(NavigableMap<Double, SegmentWithRange> result) {
        Segment last = null;
        for (Iterator<SegmentWithRange> iterator = result.descendingMap().values().iterator(); iterator.hasNext();) {
            SegmentWithRange current = iterator.next();
            if (current.getSegment().equals(last)) {
                iterator.remove();
            }
            last = current.getSegment();
        }
    }
523245
private int prepMappings() throws IOException {
    // Mark any unused mappings.
    (new MappingTraversal()).traverse(new UsedMappingCheck());

    // Renumber used mappings and keep track of the last line.
    int id = 0;
    int maxLine = 0;
    for (Mapping m : mappings) {
      if (m.used) {
        m.id = id++;
        int endPositionLine = m.endPosition.getLine();
        maxLine = Math.max(maxLine, endPositionLine);
      }
    }

    // Adjust for the prefix.
    return maxLine + prefixPosition.getLine();
  }
455248
protected final void reduceToMatchingDescriptors( @Nonnull final List<BindingProperty> bindings,
                                                    @Nonnull final List<SelectionDescriptor> descriptors )
  {
    final Iterator<BindingProperty> iterator = bindings.iterator();
    while ( iterator.hasNext() )
    {
      final BindingProperty property = iterator.next();

      // Do any selectors match?
      boolean matched = false;
      for ( final SelectionDescriptor selection : descriptors )
      {
        final BindingProperty candidate =
          findMatchingBindingProperty( selection.getBindingProperties(), property );
        if ( null != candidate )
        {
          matched = true;
          break;
        }
      }
      if ( matched )
      {
        // if so we can remove binding property from candidates list
        iterator.remove();

        // and now remove any selections that don't match
        final Iterator<SelectionDescriptor> selections = descriptors.iterator();
        while ( selections.hasNext() )
        {
          final SelectionDescriptor selection = selections.next();
          if ( null == findSatisfiesBindingProperty( selection.getBindingProperties(), property ) )
          {
            selections.remove();
          }
        }
      }
    }
  }
688552
protected int removePoorestModelBytes() {
        int poorestIndex = Utils.minIndex(this.ensembleWeights);
        int byteSize = this.ensemble[poorestIndex].measureByteSize();
        discardModel(poorestIndex);
        return byteSize;
    }
1019787
public int removeMarker() {
        System.out.println("Remove Marker");
        final int idx = getBox().getChildren().indexOf(this.marker);
        getBox().getChildren().remove(this.marker);
        return idx;
    }
778091
public E removeLast () {
		if (size > 0) {
			E e = data[--size];
			data[size] = null;
			return e;
		}

		return null;
	}
1189854
public void trimToSize(int maxSize) {
        while (true) {
            K key;
            V value;
            synchronized (this) {
                if (size < 0 || map.isEmpty() && size != 0) {
                    throw new IllegalStateException(getClass().getName() + ".sizeOf() is reporting inconsistent results!");
                }

                if (size <= maxSize || map.isEmpty()) {
                    break;
                }

                Map.Entry<K, V> toEvict = map.entrySet().iterator().next();
                key = toEvict.getKey();
                value = toEvict.getValue();
                map.remove(key);
                size -= safeSizeOf(key, value);
                evictionCount++;
            }

            entryRemoved(true, key, value, null);
        }
    }
860058
@Override
  public void trim(MemoryTrimType trimType) {
    ArrayList<Entry<K, V>> oldEntries;
    final double trimRatio = mCacheTrimStrategy.getTrimRatio(trimType);
    synchronized (this) {
      int targetCacheSize = (int) (mCachedEntries.getSizeInBytes() * (1 - trimRatio));
      int targetEvictionQueueSize = Math.max(0, targetCacheSize - getInUseSizeInBytes());
      oldEntries = trimExclusivelyOwnedEntries(Integer.MAX_VALUE, targetEvictionQueueSize);
      makeOrphans(oldEntries);
    }
    maybeClose(oldEntries);
    maybeNotifyExclusiveEntryRemoval(oldEntries);
    maybeUpdateCacheParams();
    maybeEvictEntries();
  }
313018
public void removeAllElements()
  {

    if (null == m_map)
      return;

    for (int i = 0; i < m_firstFree; i++)
    {
      m_map[i] = DTM.NULL;
    }

    m_firstFree = 0;
  }
437239
@Override
    public void deregisterFactories(ChannelFactoryProvider provider) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
            Tr.event(tc, "Removing factory provider; " + provider.getClass().getName());
        }
        for (Entry<String, Class<? extends ChannelFactory>> entry : provider.getTypes().entrySet()) {
            this.providers.remove(entry.getKey());
            deregisterFactory(entry.getKey());
        }
        this.activatedProviders.remove(provider);
    }
561593
public void clear() {
        ruleMap.clear();
        ruleConversionMap.clear();
        absentTypes.clear();
        checkedTypes.clear();
        checkedRules.clear();
        fruitlessRules.clear();
    }
451202
public void clear(boolean shrink) {
		if (elementCount > 0) {
			elementCount = 0;
		}
		if (shrink && ((elementKeys.length > 1024) && (elementKeys.length > defaultSize))) {
			elementKeys = newKeyArray(defaultSize);
			elementValues = newElementArray(defaultSize);
		} else {
			Arrays.fill(elementKeys, Integer.MIN_VALUE);
			Arrays.fill(elementValues, null);
		}
		computeMaxSize();
	}
55285
public static void remove() {

        final String current = System.getProperties().getProperty(HANDLER_PKGS, "");

        // Only one
        if (current.equals(PKG)) {
            System.getProperties().put(HANDLER_PKGS, "");
            return;
        }

        // Middle
        String token = "|" + PKG + "|";
        int idx = current.indexOf(token);
        if (idx > -1) {
            final String removed = current.substring(0, idx) + "|" + current.substring(idx + token.length());
            System.getProperties().put(HANDLER_PKGS, removed);
            return;
        }

        // Beginning
        token = PKG + "|";
        idx = current.indexOf(token);
        if (idx > -1) {
            final String removed = current.substring(idx + token.length());
            System.getProperties().put(HANDLER_PKGS, removed);
            return;
        }

        // End
        token = "|" + PKG;
        idx = current.indexOf(token);
        if (idx > -1) {
            final String removed = current.substring(0, idx);
            System.getProperties().put(HANDLER_PKGS, removed);
            return;
        }

    }
141653
public V remove (K key)
    {
        SoftReference<V> ref = _map.remove(key);
        return (ref == null) ? null : ref.get();
    }