Navigation Menu

Skip to content

Commit

Permalink
[lang] Add setInternalSkill into SREutils.
Browse files Browse the repository at this point in the history
Signed-off-by: Stéphane Galland <galland@arakhne.org>
  • Loading branch information
gallandarakhneorg committed Sep 30, 2019
1 parent 32de24f commit aeb7578
Showing 1 changed file with 13 additions and 0 deletions.
Expand Up @@ -127,6 +127,19 @@ public static <S extends Capacity> S castInternalSkillReference(Agent agent,
return agent.$castSkill(type, reference);
}

/** Set the internal skill of an agent.
*
* @param agent the agent.
* @param skill the skill instance to attach to the agent.
* @param capacities the list of implemented capacities. This array cannot be {@code null}.
* @return the reference to the skill.
* @since 0.10
*/
public static ClearableReference<Skill> setInternalSkill(Agent agent, Skill skill, Class<? extends Capacity>[] capacities) {
assert capacities != null;
return agent.$setSkill(skill, capacities);
}

/** Replies the internal skill of an agent.
*
* @param <S> the type of the capacity.
Expand Down

0 comments on commit aeb7578

Please sign in to comment.