/** * GETTER AND SETTER ***********************/ /* * change the level of the given attribute to 'value' for this instance */ public void setAttributeTo(EAttributeOther A, int value) { if (value < minLevel) throw new ArgumentOutOfRangeException("You attempted to set an attribute to high or to low! Value: " + value); else attributesOther[A] = value; // update to new level }
/** * given A, return the current level of A */ public int getAttributeLevel(EAttributeOther A) { return attributesOther[A]; }