FileDocCategorySizeDatePackage
Inventory.javaAPI DocExample1912Sun Dec 14 22:47:40 GMT 2003oreilly.hcj.nested

Inventory

public class Inventory extends Object
Demonstrates nested interfaces.
author
Robert Simmons jr. (kraythe)
version
$Revision: 1.3 $

Fields Summary
public HashSet
items
All the items in the inventory.
Constructors Summary
Methods Summary
public voidaddItem(oreilly.hcj.nested.Inventory$InventoryItem item)
Add an item.

param
item The item to add.

		items.add(item);
	
public java.util.SetgetValues()
Get a copy of all of the values.

return
An unmodifiable set that is a copy of all items in the inventory.

		return Collections.unmodifiableSet(items);
	
public java.util.Iteratoriterator()
Get an iterator for all items.

return
The iterator for the inventory.

		return items.iterator();
	
public voidremoveElement(oreilly.hcj.nested.Inventory$InventoryItem item)
Remove an item.

param
item The item to remove.

		items.remove(item);