protected Cliente(Identidade id,Nome nome,Endereco endereco,Email email,Cpf cpf) { this.id = id; this.nomeCompleto = nome; this.endereco = endereco; this.email = email; this.cpf = cpf; }
public static void checkIdValue(Identidade id) { String padrao = "^[1-9]\\d*$"; if (!Regex.IsMatch(id.ToString(),padrao)) { throw new ArgumentException("Fora das limites numéricos!"); } }
public static Cliente of(Identidade id, Nome nome, Endereco endereco, Email email,Cpf cpf) { return new Cliente(id, nome, endereco, email,cpf); }