public class Invoice extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private java.util.ArrayList<LineItem> |
items |
private java.util.ArrayList<javax.swing.event.ChangeListener> |
listeners |
Constructor and Description |
---|
Invoice()
Constructs a blank invoice.
|
Modifier and Type | Method and Description |
---|---|
void |
addChangeListener(javax.swing.event.ChangeListener listener)
Adds a change listener to the invoice.
|
void |
addItem(LineItem item)
Adds an item to the invoice.
|
java.lang.String |
format(InvoiceFormatter formatter) |
java.util.Iterator<LineItem> |
getItems()
Gets an iterator that iterates through the items.
|
private java.util.ArrayList<javax.swing.event.ChangeListener> listeners
public Invoice()
public void addItem(LineItem item)
item
- the item to addpublic void addChangeListener(javax.swing.event.ChangeListener listener)
listener
- the change listener to addpublic java.util.Iterator<LineItem> getItems()
public java.lang.String format(InvoiceFormatter formatter)