Finds the object with the minimum key, removes it from the heap,
and returns it.

@return the object with minimum key
500735
public E extractMin() {
    if (isEmpty()) {
      throw new NoSuchElementException();
    }
    HeapEntry<E> minEntry = indexToEntry.get(0);
    int lastIndex = size() - 1;
    if (lastIndex > 0) {
      HeapEntry<E> lastEntry =  indexToEntry.get(lastIndex);
      swap(lastEntry, minEntry);
      removeLast(minEntry);
      heapifyDown(lastEntry);
    } else {
      removeLast(minEntry);
    }
    return minEntry.object;
  }
989510
public int find(Object key) {
        Object o = this.map.get(key);
        return o instanceof Integer ? ((Integer) o).intValue() : none;
    }
660067
@Override
    public V get(Object key) {
        // Keys can not be null
        if (key == null) {
            throw new NullPointerException("Key can not be null");
        }
        if (!(key instanceof String)) {
            throw new ClassCastException("Only String keys are supported -- got " + key.getClass());
        }
        // Empty keys are stored in the root
        if (key.equals("")) {
            if (root.getRight() == null) {
                return null;
            } else {
                return root.getRight().getValue();
            }
        }

        // Find nearest node
        PatriciaNode<V> nearest = findNearestNode((String) key);

        // If the nearest node matches key, we have a match
        if (key.equals(nearest.getKey())) {
            return nearest.getValue();
        } else {
            return null;
        }
    }
242007
public V get(Object key) {
        final int index = indexOfKey(key);
        return index >= 0 ? (V)mArray[(index<<1)+1] : null;
    }
771519
public final T poll() {
		if (size > 0) {
			T result = heap[1]; // save first value
			heap[1] = heap[size]; // move last to first
			heap[size] = null; // permit GC of objects
			size--;
			downHeap(); // adjust heap
			return result;
		} else {
			return null;
		}
	}
411936
public T getObject(String key) {
        if (this.objects.containsKey(key)) {
            return this.objects.get(key);
        }
        return null;
    }
454945
public T min() {
        TObjectIntIterator<T> iter = counts.iterator();
        int minCount = Integer.MAX_VALUE;
        T min = null;
        while (iter.hasNext()) {
            iter.advance();
            int count = iter.value();
            if (count < minCount) {
                min = iter.key();
                minCount = count;
            }
        }
        return min;
    }
952596
public Object get(Object key)
    {
        purge();
        Entry entry = getEntry(key);
        if (entry == null) return null;
        return entry.getValue();
    }
1017153
public final T pop()
    {
        if (size > 0)
        {
            T result = heap[1]; // save first value
            heap[1] = heap[size]; // move last to first
            heap[size] = null; // permit GC of objects
            size--;
            downHeap(); // adjust heap
            return result;
        }
        else
        {
            return null;
        }
    }
89398
public V remove(@NonNull K key) {
        Entry<K, V> toRemove = get(key);
        if (toRemove == null) {
            return null;
        }
        mSize--;
        if (!mIterators.isEmpty()) {
            for (SupportRemove<K, V> iter : mIterators.keySet()) {
                iter.supportRemove(toRemove);
            }
        }

        if (toRemove.mPrevious != null) {
            toRemove.mPrevious.mNext = toRemove.mNext;
        } else {
            mStart = toRemove.mNext;
        }

        if (toRemove.mNext != null) {
            toRemove.mNext.mPrevious = toRemove.mPrevious;
        } else {
            mEnd = toRemove.mPrevious;
        }

        toRemove.mNext = null;
        toRemove.mPrevious = null;
        return toRemove.mValue;
    }
1150815
public T min() {
        TObjectDoubleIterator<T> iter = counts.iterator();
        double minCount = Double.MAX_VALUE;
        T min = null;
        while (iter.hasNext()) {
            iter.advance();
            double count = iter.value();
            if (count < minCount) {
                min = iter.key();
                minCount = count;
            }
        }
        return min;
    }
262803
private int minimumFnRemove(int[] h) {
    int minIndex = Integer.MAX_VALUE;
    double minValue = Double.MAX_VALUE;

    for (int i = 0; i < nbHash; i++) {
      double keyWeight = getWeight(keyVector[h[i]]);

      if (keyWeight < minValue) {
        minIndex = h[i];
        minValue = keyWeight;
      }

    }

    return minIndex;
  }
654528
public final V remove(Object key) {
	
	if(key == null) return null;

	int key_hash_code = key.hashCode();
	BinTreeNode<K,V> prev = null;
	int son = 0;
	BinTreeNode<K,V> node = root;

	while(node != null) {
	    if(key_hash_code < node.keyHashCode) {
		prev = node;
		node = node.left;
		son  = 0;
	    }
	    else {
		if((key_hash_code > node.keyHashCode) || !node.key.equals(key)) {
		    prev = node;
		    node = node.right;
		    son  = 1;
		}
		else {
		    size--;
		    cachedHashCode -= node.hashCode();
		    return remove_node(node, prev, son);
		}
	    }
	}
	return null;
    }
1326042
public V get (K key)
    {
        V value = null;
        SoftReference<V> ref = _map.get(key);
        if (ref != null) {
            value = ref.get();
            if (value == null) {
                _map.remove(key);
            }
        }
        return value;
    }
151827
public int remove(Object key)
  {
    if (key == null)
      key = NULL_KEY;

    int hash = key.hashCode() & _mask;

    synchronized (this) {
      Item prev = null;
      for (Item item = _entries[hash]; item != null; item = item._next) {
        Object itemKey = item._key;
      
        if (itemKey == key || itemKey.equals(key)) {
          int oldValue = item._value;

          if (prev != null)
            prev._next = item._next;
          else
            _entries[hash] = item._next;

          _size--;

          return oldValue;
        }

        prev = item;
      }
    }

    return NULL;
  }
219387
public int min() {
    int min = Integer.MAX_VALUE;
    for (E key : map.keySet()) {
      min = Math.min(min, getIntCount(key));
    }
    return min;
  }
796565
public Object remove(Object key)
    {
        Object retVal = null;

        if (null == key) throw new IllegalArgumentException("key must not be null");
        if (this.containsKey(key))
        {
            retVal = super.remove(key);

            for (int i = 0; i < this.order.size(); i++)
            {
                Object obj = this.order.get(i);
                if (obj.equals(key))
                {
                    this.order.remove(i);
                    break;
                }
            }
        }
        return retVal;
    }