<?php
namespace App\Entities\Especie;

use App\Utils\Builder;
use App\Utils\Entity;

class EspecieBuilder implements Builder
{
    protected $id;
    protected $nome;

    public function setId($id)
    {
        $this->id = $id;
        return $this;
    }

    public function setNome($nome)
    {
        $this->nome = $nome;
        return $this;
    }





    public function build() : Especie
    {
        $exame = new Especie();
        if (isset($this->id)) {
            $exame->setId($this->id);
        }
        if (isset($this->nome)) {
            $exame->setNome($this->nome);
        }
        return $exame;
    }
}