|
Java Universal Role Playing Engine Version 0.3.9 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjurpe.containers.Inventory
public class Inventory
PCharacter Inventory. Contains an ArrayList of BasicItems
| Constructor Summary | |
|---|---|
Inventory()
Constructs a new Inventory with default money quantity. |
|
Inventory(int denari)
Constructs new Inventory with "denary" money |
|
| Method Summary | |
|---|---|
void |
addBasicItem(AbstractItem x)
Add AbstractItem x to current Inventory |
int |
count()
The number of items in this inventory |
void |
earnMoney(int somma)
Add "somma" money to current money |
void |
earnMoney(long somma)
Add "somma" money to current money |
int |
getAvailableMoney()
Get current money available |
int |
getEncumbrance()
Get current character encumbrance |
java.util.AbstractList<AbstractItem> |
getInventoryItems()
Get ArrayList containing AbstractItem available to character |
void |
removeBasicItem(AbstractItem x)
Remove AbstractItem x from Inventory |
void |
sellBasicItem(AbstractItem x,
int price)
Remove AbstractItem x from Inventory |
void |
spendMoney(int somma)
Remove "somma" money from current money |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Inventory()
public Inventory(int denari)
denari - Money| Method Detail |
|---|
public int count()
public int getAvailableMoney()
public java.util.AbstractList<AbstractItem> getInventoryItems()
public void addBasicItem(AbstractItem x)
x - AbstractItem to add to Inventorypublic void removeBasicItem(AbstractItem x)
x - AbstractItem to removeAbstractItem
public void sellBasicItem(AbstractItem x,
int price)
x - AbstractItem to removeprice - Earn money amount when selling itemAbstractItempublic void spendMoney(int somma)
somma - Money to be spentpublic void earnMoney(int somma)
somma - public void earnMoney(long somma)
somma - public int getEncumbrance()
|
Java Universal Role Playing Engine Version 0.3.9 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||