|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--Item
Abstract class to represent an Item.
MonsterBallItem
,
PotionItem
,
People
Field Summary | |
protected int |
brand
The brand of Item this is. |
static int |
MONSTERBALL
Brand of MonsterBall |
protected java.lang.String |
name
The name of this Item |
protected int |
number
The number amount of this that the People has. |
static int |
POTION
Brand of Potion |
Constructor Summary | |
Item()
|
Method Summary | |
void |
addItem()
Adds another of this. |
boolean |
equals(Item i)
Determines if there is equality |
boolean |
equals(java.lang.Object o)
Determines if there is equality |
int |
getBrand()
Gets the Brand of this. |
int |
getItemCount()
Gets the number of this there is |
java.lang.String |
getName()
Gets the name of this Item. |
abstract int |
getSubBrand()
Gets the subBrand of this defined in PotionItem and MonsterBallItem |
void |
setItemCount(int ic)
Sets the number of this there is. |
void |
setName(java.lang.String nn)
Sets the name of this Item. |
abstract boolean |
useItem(Monster m)
Uses the item on the Monster Specified |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int MONSTERBALL
public static final int POTION
protected java.lang.String name
protected int number
protected int brand
Constructor Detail |
public Item()
Method Detail |
public void setName(java.lang.String nn)
nn
- the New Name of this.public java.lang.String getName()
public void addItem()
public void setItemCount(int ic)
ic
- the new Item Countpublic int getItemCount()
public abstract boolean useItem(Monster m)
m
- the Monster to use the Item onpublic int getBrand()
public abstract int getSubBrand()
MonsterBallItem
,
PotionItem
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
o
- the Object to compare to
public boolean equals(Item i)
i
- the Item to compare to
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |