Identify if the object passed in is a feat. @param obj The object to be checked. @return true if this is a feat, false if not.
(Object obj)
| 159 | * @return true if this is a feat, false if not. |
| 160 | */ |
| 161 | public static boolean isFeat(Object obj) |
| 162 | { |
| 163 | if (!(obj instanceof Ability ability)) |
| 164 | { |
| 165 | return false; |
| 166 | } |
| 167 | if (ability.getCDOMCategory() == null) |
| 168 | { |
| 169 | return false; |
| 170 | } |
| 171 | return (ability.getCDOMCategory() == AbilityCategory.FEAT) |
| 172 | || (ability.getCDOMCategory().getParentCategory() == AbilityCategory.FEAT); |
| 173 | } |
| 174 | |
| 175 | public static Ability validateCNAList(List<CNAbility> list) |
| 176 | { |
no test coverage detected