Building Parsers with Java

sjm.examples.chips
Class Order

java.lang.Object
  |
  +--sjm.examples.chips.Order

public class Order
extends java.lang.Object

An order is a standing request from a customer for a monthly supply of a number of bags of a type of chip.


Field Summary
protected  java.lang.Integer bagsPerMonth
           
protected  Chip chip
           
protected  Customer customer
           
 
Constructor Summary
Order(Customer customer, Chip chip, int bagsPerMonth)
          Create an order given a customer, a chip, and a number of bags to ship per month.
Order(Customer customer, Chip chip, java.lang.Integer bagsPerMonth)
          Create an order given a customer, a chip, and a number of bags to ship per month.
 
Method Summary
 java.lang.Integer getBagsPerMonth()
          Return the number of bags per month to ship.
 Chip getChip()
          Return this order's chip type.
 Customer getCustomer()
          Return this order's customer.
 java.lang.String toString()
          Return a textual description of this order.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

customer

protected Customer customer

chip

protected Chip chip

bagsPerMonth

protected java.lang.Integer bagsPerMonth
Constructor Detail

Order

public Order(Customer customer,
             Chip chip,
             int bagsPerMonth)
Create an order given a customer, a chip, and a number of bags to ship per month.

Order

public Order(Customer customer,
             Chip chip,
             java.lang.Integer bagsPerMonth)
Create an order given a customer, a chip, and a number of bags to ship per month.
Method Detail

getBagsPerMonth

public java.lang.Integer getBagsPerMonth()
Return the number of bags per month to ship.
Returns:
the number of bags per month to ship

getChip

public Chip getChip()
Return this order's chip type.
Returns:
this order's chip type

getCustomer

public Customer getCustomer()
Return this order's customer.
Returns:
this order's customer

toString

public java.lang.String toString()
Return a textual description of this order.
Overrides:
toString in class java.lang.Object
Returns:
a textual description of this order

by Steve Metsker