|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorderprocessing.Invoice
This class represents what will ship from a customer order.
Additionally, this class maintains a collection of all Invoices.
Constructor Summary | |
Invoice(Order order,
java.util.ArrayList shipableItems)
Create an Invoice for a particular customer and a sequence of items ordered |
Method Summary | |
static void |
close(java.io.ObjectOutputStream out)
Write all of the Invoice data for all invoices to an output stream |
Customer |
customer()
Retrieve the customer that generated this invoice |
void |
display()
Display on standard out the information about Items that will ship, including extended prices and a total |
static void |
dump()
Display all of the invoices on standard output. |
boolean |
equals(java.lang.Object other)
|
void |
format(java.io.BufferedWriter file)
Format the invoices for printing |
static void |
formatAll(java.io.BufferedWriter file)
Format all of the invoices (no implied order) and write to output |
static Invoice |
get(java.lang.String key)
Get a particular invoice object from its customer number. |
int |
hashCode()
|
CalculationCalendar |
invoiceDate()
Retrieve the date the invoice was generated |
static java.util.Iterator |
invoices()
Provide an iteration service over all known invoices. |
java.lang.String |
key()
Return the invoice number |
static java.util.Iterator |
keys()
Provide an iterator over the invoice numbers. |
static void |
open(java.io.ObjectInputStream in)
Read all invoice data for all invoices into the program at the beginning of a run |
Order |
order()
Retrieve the order that generated this invoice |
CalculationCalendar |
paymentDueDate()
Retrieve the date payment is due for this invoice |
java.util.Iterator |
shipableItems()
Iterate over the shippable items for this invoice |
CalculationCalendar |
shipDate()
Retrieve the date this invoice will/did ship |
int |
size()
Retrieve the number of line items on this invoice |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Invoice(Order order, java.util.ArrayList shipableItems)
order
- The order from which this invoice originatesshipableItems
- A ArrayList of OrderItems representing the items shippedMethod Detail |
public Customer customer()
public java.util.Iterator shipableItems()
public int size()
public CalculationCalendar shipDate()
public CalculationCalendar invoiceDate()
public Order order()
public java.lang.String key()
public CalculationCalendar paymentDueDate()
public void display()
public boolean equals(java.lang.Object other)
public int hashCode()
public java.lang.String toString()
public static void formatAll(java.io.BufferedWriter file)
file
- the file to write topublic void format(java.io.BufferedWriter file) throws java.io.IOException
file
- the file to write the formatted invoice on
java.io.IOException
public static Invoice get(java.lang.String key)
key
- the invoice number
public static final void close(java.io.ObjectOutputStream out) throws java.io.IOException
out
- the Object stream to write to
java.io.IOException
public static final void open(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException
in
- the Object stream to read from
java.io.IOException
java.lang.ClassNotFoundException
public static java.util.Iterator invoices()
public static java.util.Iterator keys()
public static void dump()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |