A WeaponProfProvider is an object that contains the ability to contain WeaponProficiencies, either by TYPE or direct WeaponProf references. Explicit Storage of TYPE vs. primitive is necessary due to the ability of the CHANGEPROF token to change types for a WeaponProf. This is typically used for an
| 42 | * proficiencies. |
| 43 | */ |
| 44 | public class WeaponProfProvider extends ConcretePrereqObject implements QualifyingObject |
| 45 | { |
| 46 | |
| 47 | private static final ChangeProfFacet CHANGE_PROF_FACET = FacetLibrary.getFacet(ChangeProfFacet.class); |
| 48 | |
| 49 | /** |
| 50 | * Contains the list of primitive WeaponProf objects that this |
| 51 | * WeaponProfProvider contains |
| 52 | */ |
| 53 | private List<CDOMSingleRef<WeaponProf>> direct; |
| 54 | |
| 55 | /** |
| 56 | * Contains the list of TYPEs of WeaponProf objects that this |
| 57 | * WeaponProfProvider contains |
| 58 | */ |
| 59 | private List<CDOMGroupRef<WeaponProf>> type; |
| 60 | |
| 61 | /** |
| 62 | * Contains the All WeaponProf reference if this WeaponProfProvider contains |
| 63 | * it |
| 64 | */ |
| 65 | private CDOMGroupRef<WeaponProf> all; |
| 66 | |
| 67 | /** |
| 68 | * Adds a primitive WeaponProf reference to this WeaponProfProvider. |
| 69 | * |
| 70 | * @param ref |
| 71 | * The primitive WeaponProf reference that should be added to |
| 72 | * this WeaponProfProvider |
| 73 | */ |
| 74 | public void addWeaponProf(CDOMSingleRef<WeaponProf> ref) |
| 75 | { |
| 76 | if (direct == null) |
| 77 | { |
| 78 | direct = new ArrayList<>(); |
| 79 | } |
| 80 | direct.add(ref); |
| 81 | } |
| 82 | |
| 83 | /** |
| 84 | * Adds a WeaponProf TYPE reference to this WeaponProfProvider. |
| 85 | * |
| 86 | * @param ref |
| 87 | * The WeaponProf TYPE reference that should be added to this |
| 88 | * WeaponProfProvider |
| 89 | */ |
| 90 | public void addWeaponProfType(CDOMGroupRef<WeaponProf> ref) |
| 91 | { |
| 92 | if (type == null) |
| 93 | { |
| 94 | type = new ArrayList<>(); |
| 95 | } |
| 96 | type.add(ref); |
| 97 | } |
| 98 | |
| 99 | /** |
| 100 | * Adds a All WeaponProf reference to this WeaponProfProvider. |
| 101 | * |