for (Enumeration i = equipmentList.elements();i.hasMoreElements();) { Mounted mounted = (Mounted)i.nextElement();
for (Mounted mounted : getEquipment()){
    public int getWeaponsAndEquipmentCost() {        int cost=0;        for (Enumeration i = equipmentList.elements();i.hasMoreElements();) {             Mounted mounted = (Mounted)i.nextElement();             int itemCost=(int)mounted.getType().getCost();             if(itemCost==EquipmentType.COST_VARIABLE) {                itemCost=mounted.getType().resolveVariableCost(this);            }            cost +=itemCost;        }        return cost;    }