Code example for Hashtable

Methods: get, put, remove

0
	} 
	else { 
	    // Remove oldest URI from reference Hashtable 
	    _references.remove(_URIs[_current]);
	    // Insert our URI in circular buffer 
	    _URIs[_current] = uri;
	    if (++_current >= _size) _current = 0;
	} 
	_references.put(uri, doc);
    } 
 
    /** 
     * 
     */ 
    private synchronized void replaceDocument(String uri, CachedDocument doc) {
	CachedDocument old = (CachedDocument)_references.get(uri);
	if (doc == null)
	    insertDocument(uri, doc);
	else 
	    _references.put(uri, doc);
    } 
 
    /** 
     * Returns a document either by finding it in the cache or 
     * downloading it and putting it in the cache. 
     */ 
    public DOM retrieveDocument(String baseURI, String href, Translet trs) {