/** * Constructs a new HashMap with the same mappings as the specified Map. */ private function HashMap0(Map $m) { parent::__construct(); for ($i = $m->iterator(); $i->hasNext(); $i->next()) { $this->put($i->current, $m->get($i->current())); } }
/** * Copies all of the mappings from the specified map to this map (optional operation). */ public function putAll(Map $t) { $keys = $t->keySet(); for ($i = $keys->iterator(); $i->hasNext(); $i->next()) { $this->put($i->current(), $t->get($i->current())); } }