Code example for HashMap

Methods: getputsize

0
     *       recently used position, but doesn't add 
     *       a duplicate entry in the queue. 
     * @param now  
     */ 
    public final synchronized void push(T value, long now) {
    	assert(elements.size() == valueToElement.size());
    	if (value == null)
    		throw new NullPointerException();
    	 
    	Element<T> e = valueToElement.get(value);
    	 
    	if(e == null) {
    		e = new Element<T>(now, value);
    		elements.add(e);
    		valueToElement.put(value, e);
    	} else { 
    		elements.remove(e);
    		e.time = now;
    		elements.add(e);
    	} 
    	 
    	assert(elements.size() == valueToElement.size());
    }  
 
    public final int size() { 
        return elements.size();
    }