|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.huguesjohnson.tiamat.SkillCollection
SkillCollection - used to store a collection of skills
| Constructor Summary | |
SkillCollection()
|
|
SkillCollection(Skill[] skills)
|
|
SkillCollection(Skill[] skills,
java.lang.String pathDelimiter)
|
|
SkillCollection(java.lang.String pathDelimiter)
|
|
| Method Summary | |
void |
adjustAllSkills(int percentage)
adjusts the values of all Skills in the collection by the given percentage, useful for updating all Skills uniformly for gaining/losing a level |
void |
adjustSkills(java.lang.String rootPath,
int percentage)
adjusts the values of all Skills under the rootPath by the given percentage, useful for updating all Skills uniformly for gaining/losing a level |
Skill[] |
getAll()
return all Skills in the collection |
Skill |
getAttribute(java.lang.String path)
return the Skill with that name if it exists, otherwise null |
int |
getCount()
returns the total number of Skills in the collection |
int |
getCount(java.lang.String path)
returns the total number of Skills starting from the path |
Skill[] |
getModifiersFor(java.lang.String targetPath)
return an array of all Skills that have a target with a targetPath 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 |
removeSkill(java.lang.String path)
return success |
void |
setAttribute(java.lang.String path,
Skill skill)
sets the Skill 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 SkillCollection()
public SkillCollection(java.lang.String pathDelimiter)
public SkillCollection(Skill[] skills)
public SkillCollection(Skill[] skills,
java.lang.String pathDelimiter)
| Method Detail |
public boolean removeSkill(java.lang.String path)
public Skill getAttribute(java.lang.String path)
public void setAttribute(java.lang.String path,
Skill skill)
public int getCount()
public int getCount(java.lang.String path)
public Skill[] getModifiersFor(java.lang.String targetPath)
public int getNetModification(java.lang.String targetPath)
public void adjustAllSkills(int percentage)
public void adjustSkills(java.lang.String rootPath,
int percentage)
public Skill[] getAll()
public java.lang.String toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||