Building Parsers with Java

sjm.examples.chips
Class ChipBase

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

public class ChipBase
extends java.lang.Object

This class contains a small database of chips, customers, and orders.


Field Summary
protected static java.util.Dictionary chip
           
protected static java.util.Dictionary customer
           
protected static java.util.Vector order
           
 
Constructor Summary
ChipBase()
           
 
Method Summary
static void add(Chip c)
          Adds a chip to the database.
static void add(Customer c)
          Adds a customer to the database.
static void add(Order o)
          Adds an order to the database.
static java.util.Dictionary chip()
          Returns a dictionary of chip types.
static Chip chip(int ID)
          Return a chip, given its ID.
static java.util.Dictionary customer()
          Returns a dictionary of customers.
static Customer customer(int ID)
          Return a customer, given his or her ID.
static java.util.Vector order()
          Returns a vector of orders.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

chip

protected static java.util.Dictionary chip

customer

protected static java.util.Dictionary customer

order

protected static java.util.Vector order
Constructor Detail

ChipBase

public ChipBase()
Method Detail

add

public static void add(Chip c)
Adds a chip to the database.
Parameters:
Chip - the chip to add

add

public static void add(Customer c)
Adds a customer to the database.
Parameters:
Customer - the customer to add

add

public static void add(Order o)
Adds an order to the database.
Parameters:
Order - the order to add

chip

public static java.util.Dictionary chip()
Returns a dictionary of chip types.
Returns:
a dictionary of chip types

chip

public static Chip chip(int ID)
Return a chip, given its ID.
Parameters:
ID - a chip ID
Returns:
a chip

customer

public static java.util.Dictionary customer()
Returns a dictionary of customers.

customer

public static Customer customer(int ID)
Return a customer, given his or her ID.
Parameters:
ID - a customer ID
Returns:
a customer

order

public static java.util.Vector order()
Returns a vector of orders.

by Steve Metsker