/** * {@inheritdoc} */ public function equals(MapInterface $map) : bool { if (!$map->keys()->equals($this->keys())) { return false; } return $map->values()->equals($this->values()); }
/** * 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); }