Package mekhq.campaign.personnel.skills
Class Skills
java.lang.Object
mekhq.campaign.personnel.skills.Skills
Tracks skills for a
Person.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a skill.voidclear()Removes all the skills.Gets aSkillby name.Gets a collection of skill names.Gets a collection ofSkillobjects.booleanGets a value indicating if a certain skill is possessed.booleanremoveSkill(String name) Removes a skill.intsize()Gets the number of skills.
-
Field Details
-
SKILL_LEVELS
public static final megamek.common.enums.SkillLevel[] SKILL_LEVELS
-
-
Constructor Details
-
Skills
public Skills()
-
-
Method Details
-
size
public int size()Gets the number of skills.- Returns:
- The number of skills.
-
clear
public void clear()Removes all the skills. -
hasSkill
Gets a value indicating if a certain skill is possessed.- Parameters:
name- The name of the skill.- Returns:
- True if and only if the skill is active.
-
getSkill
Gets aSkillby name.- Parameters:
name- The name of the skill.- Returns:
- The
Skill, if one exists, otherwise null.
-
addSkill
Adds a skill.- Parameters:
name- The name of the skill.skill- TheSkillto track.
-
removeSkill
Removes a skill.- Parameters:
name- The name of the skill to remove.- Returns:
- True if the skill was removed, otherwise false.
-
getSkillNames
Gets a collection of skill names.- Returns:
- A collection of skill names.
-
getSkills
Gets a collection ofSkillobjects.- Returns:
- A collection of
Skillobjects.
-