for (Iterator iter = myMalfunctions.values().iterator(); iter.hasNext(); i++) { Malfunction currentMalfunction = (Malfunction) (iter.next());
for (Malfunction currentMalfunction : myMalfunctions.values()){
    public String[] getMalfunctionNames() {        String[] malfunctionNames = new String[myMalfunctions.size()];        int i = 0;        for (Iterator iter = myMalfunctions.values().iterator(); iter.hasNext(); i++) {            Malfunction currentMalfunction = (Malfunction) (iter.next());            malfunctionNames[i] = currentMalfunction.getName();        }        return malfunctionNames;    }