|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectrlgamekit.item.ItemCatalog
public class ItemCatalog
A catalog structure for items.
| Constructor Summary | |
|---|---|
ItemCatalog(ItemConfiguration config)
Build a new item catalog with the given item configuartion |
|
| Method Summary | |
|---|---|
void |
addItem(AbstractItem ait)
Add an item to the item list. |
AbstractItem |
getAbstractItem(java.lang.String key)
Items are addressed by their keys. |
AbstractItem[] |
getAllItemsSorted()
|
ItemConfiguration |
getItemConfiguration()
|
void |
moveItem(int index,
int offset)
Move an item in the item list. |
void |
read(java.io.BufferedReader reader,
boolean itemsOnly)
|
void |
removeItem(java.lang.String key)
Remove an item from the item list. |
void |
write(java.io.Writer writer)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ItemCatalog(ItemConfiguration config)
config - The item configuration to use for all itemsVec in this catalog.| Method Detail |
|---|
public ItemConfiguration getItemConfiguration()
public AbstractItem getAbstractItem(java.lang.String key)
key - The item key.
public AbstractItem[] getAllItemsSorted()
public void addItem(AbstractItem ait)
ait - The item to add.public void removeItem(java.lang.String key)
key - The item key.
public void moveItem(int index,
int offset)
index - Base item index.offset - Second item offset from base index.
public void read(java.io.BufferedReader reader,
boolean itemsOnly)
throws java.io.IOException
java.io.IOException
public void write(java.io.Writer writer)
throws java.io.IOException
java.io.IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||