Code example for HashMap

Methods: removesize

    public final int size() { 
        return elements.size();
    public final synchronized boolean removeValue(T value) {
    	assert(elements.size() == valueToElement.size());
    	Element<T> e = valueToElement.remove(value);
    	if(e == null) return false;
    	assert(elements.size() == valueToElement.size());
    	return true; 
    public final synchronized boolean containsValue(T key) {
    	return valueToElement.containsKey(key);
     * Note that this does not automatically promote the key. You have 
     * to do that by hand with push(key, value). 
Contextual code suggestions in your IDE  Get Codota for Java