예제 #1
0
파일: HashMap.php 프로젝트: rgantt/japha
 /**
  * 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()));
     }
 }
예제 #2
0
 /**
  * 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()));
     }
 }