/** * Associates the specified value with the specified keys in this map. * If the map previously contained a mapping for this key, the old * value is replaced. * * @param namespaceUri First key with which the specified value is to be associated. * @param localname Second key with which the specified value is to be associated. * @param value value to be associated with the specified key. * */ public void put(String namespaceUri,String localname, V value ) { //keys cannot be null assert localname !=null; assert namespaceUri !=null; // keys must be interned assert localname == localname.intern(); assert namespaceUri == namespaceUri.intern(); int hash = hash(localname); int i = indexFor(hash, table.length); for (Entry<V> e = table[i]; e != null; e = e.next) { if (e.hash == hash && localname == e.localName && namespaceUri==e.nsUri) { e.value = value; return; } } addEntry(hash, namespaceUri,localname, value, i); }
/** * Associates the specified value with the specified keys in this map. * If the map previously contained a mapping for this key, the old * value is replaced. * * @param namespaceUri First key with which the specified value is to be associated. * @param localname Second key with which the specified value is to be associated. * @param value value to be associated with the specified key. * */ public void put(String namespaceUri,String localname, V value ) { //keys cannot be null assert localname !=null; assert namespaceUri !=null; // keys must be interned assert localname == localname.intern(); assert namespaceUri == namespaceUri.intern(); int hash = hash(localname); int i = indexFor(hash, table.length); for (Entry<V> e = table[i]; e != null; e = e.next) { if (e.hash == hash && localname == e.localName && namespaceUri==e.nsUri) { e.value = value; return; } } addEntry(hash, namespaceUri,localname, value, i); }
/** * Associates the specified value with the specified keys in this map. * If the map previously contained a mapping for this key, the old * value is replaced. * * @param namespaceUri First key with which the specified value is to be associated. * @param localname Second key with which the specified value is to be associated. * @param value value to be associated with the specified key. * */ public void put(String namespaceUri,String localname, V value ) { //keys cannot be null assert localname !=null; assert namespaceUri !=null; // keys must be interned assert localname == localname.intern(); assert namespaceUri == namespaceUri.intern(); int hash = hash(localname); int i = indexFor(hash, table.length); for (Entry<V> e = table[i]; e != null; e = e.next) { if (e.hash == hash && localname == e.localName && namespaceUri==e.nsUri) { e.value = value; return; } } addEntry(hash, namespaceUri,localname, value, i); }
/** * Associates the specified value with the specified keys in this map. * If the map previously contained a mapping for this key, the old * value is replaced. * * @param namespaceUri First key with which the specified value is to be associated. * @param localname Second key with which the specified value is to be associated. * @param value value to be associated with the specified key. * */ public void put(String namespaceUri,String localname, V value ) { //keys cannot be null assert localname !=null; assert namespaceUri !=null; // keys must be interned assert localname == localname.intern(); assert namespaceUri == namespaceUri.intern(); int hash = hash(localname); int i = indexFor(hash, table.length); for (Entry<V> e = table[i]; e != null; e = e.next) { if (e.hash == hash && localname == e.localName && namespaceUri==e.nsUri) { e.value = value; return; } } addEntry(hash, namespaceUri,localname, value, i); }