예제 #1
0
파일: Map.php 프로젝트: Innmind/Immutable
 /**
  * {@inheritdoc}
  */
 public function equals(MapInterface $map) : bool
 {
     if (!$map->keys()->equals($this->keys())) {
         return false;
     }
     return $map->values()->equals($this->values());
 }
예제 #2
0
 /**
  * Iterator Constructor.
  *
  * @param MapInterface $map The map to iterate
  */
 public function __construct(MapInterface $map)
 {
     $this->map = $map;
     $this->keys = $map->keys();
     $this->key = reset($this->keys);
 }