Created
November 16, 2016 19:31
-
-
Save edermfl/ae420419cf5b22c2283b1ead501b6d41 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Nf { | |
Integer numero; | |
List<Item> itens; | |
Cliente cliente; | |
public Nf(Integer numero){ | |
this.numero = numero; | |
itens = new ArrayList<Item>(); | |
} | |
Nf com(int quantidade, String nome) { | |
itens.add(new Item(nome, quantidade)); | |
return this; | |
} | |
Nf paraCliente(String nome) { | |
cliente = new Cliente(nome); | |
return this; | |
} | |
void gerarNf() { | |
// ... | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment