|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.huguesjohnson.tiamat.ItemCollection
ItemCollection - used to store a collection of items
| Constructor Summary | |
ItemCollection()
|
|
ItemCollection(Item[] items)
|
|
ItemCollection(Item[] items,
java.lang.String pathDelimiter)
|
|
ItemCollection(java.lang.String pathDelimiter)
|
|
| Method Summary | |
Item[] |
getAll()
return all Items in the collection |
int |
getCount()
returns the total number of Items in the collection |
int |
getCount(java.lang.String path)
returns the total number of Items starting from the path |
Item |
getItem(java.lang.String path)
return the Item with that name if it exists, otherwise null |
Item[] |
getModifiersFor(java.lang.String targetPath)
return an array of all equipped Items that have a target with a targetName equal to targetPath |
int |
getNetModification(java.lang.String targetPath)
use getModifiersFor() to get all the modifiers for a target, return the sum of their values |
boolean |
removeItem(java.lang.String path)
return success |
void |
setItem(java.lang.String path,
Item item)
sets the Item with the given path, adds it if it doesn’t exist |
java.lang.String |
toString()
returns a string representation of the object |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public ItemCollection()
public ItemCollection(java.lang.String pathDelimiter)
public ItemCollection(Item[] items)
public ItemCollection(Item[] items,
java.lang.String pathDelimiter)
| Method Detail |
public boolean removeItem(java.lang.String path)
public Item getItem(java.lang.String path)
public void setItem(java.lang.String path,
Item item)
public int getCount()
public int getCount(java.lang.String path)
public Item[] getModifiersFor(java.lang.String targetPath)
public int getNetModification(java.lang.String targetPath)
public Item[] getAll()
public java.lang.String toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||