I strongly recommend you to build around dynamic arrays, even a Set<> will be using quite less memory (even if that may already be insignificant), and might be excesivelly efficient on cpu-consuming tasks. A primitive ArrayOf[Object()] will be really faster and more convenient using the ClassID as the key for the value.
This kind of evaluations are sortta unnecessary
int val = (int) calcStat(Stats.MAGIC_ATTACK_SPEED, base, null, null);
for (String className : Config.LIMIT_CASTING_SPEED.keySet())
{
if (Config.LIMIT_CASTING_SPEED.containsKey(_actor.getClassId().toString()) && val > Config.LIMIT_CASTING_SPEED.get(className))
val = Config.LIMIT_CASTING_SPEED.get(className);
}
Have in mind that, FOR EACH String inside your Config, the loop will be doing X function in order to find the requested value, repeating this for every Class that is requested to acquire the desired value.
Meanwhile, a simple Array[Int[]] will be faster and much more efficient:
Int[][] class_castSpd_value;
int val = class_castSpd_value[classId];