Class Skills

java.lang.Object
mekhq.campaign.personnel.skills.Skills

public class Skills extends Object
Tracks skills for a Person.
  • 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

      public boolean hasSkill(@Nullable String name)
      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

      @Nullable public Skill getSkill(String name)
      Gets a Skill by name.
      Parameters:
      name - The name of the skill.
      Returns:
      The Skill, if one exists, otherwise null.
    • addSkill

      public void addSkill(String name, Skill skill)
      Adds a skill.
      Parameters:
      name - The name of the skill.
      skill - The Skill to track.
    • removeSkill

      public boolean removeSkill(String name)
      Removes a skill.
      Parameters:
      name - The name of the skill to remove.
      Returns:
      True if the skill was removed, otherwise false.
    • getSkillNames

      public Collection<String> getSkillNames()
      Gets a collection of skill names.
      Returns:
      A collection of skill names.
    • getSkills

      public Collection<Skill> getSkills()
      Gets a collection of Skill objects.
      Returns:
      A collection of Skill objects.