Class Catalog

java.lang.Object
  extended byCatalog

public class Catalog
extends Object

A Catalog models the collection of Items that an EStore might carry.

Version:
4
See Also:
EStore

Constructor Summary
Catalog()
          Construct a Catalog object.
 
Method Summary
 void addItem(Item item)
          Add an Item to this Catalog.
 Item getItem(String itemName)
          Get an Item from this Catalog.
 void show(Terminal t)
          Display the contents of this Catalog.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Catalog

public Catalog()
Construct a Catalog object.

Method Detail

addItem

public void addItem(Item item)
Add an Item to this Catalog.

Parameters:
item - the Item to add.

getItem

public Item getItem(String itemName)
Get an Item from this Catalog.

Parameters:
itemName - the name of the wanted Item
Returns:
the Item, null if none.

show

public void show(Terminal t)
Display the contents of this Catalog.

Parameters:
t - the Terminal to print to.