}
} */
        private void setValue(String uid, String newvalue) {            Diagnosis d;            DiagRecord dr;                        //find the diagnosis            Iterator i = diagnoses.iterator();            while (i.hasNext()) {                dr = (DiagRecord)i.next();                                d = (Diagnosis)dr.getDiagnosis();                if (d.getUID().toString().equals(uid)) {                    if (d instanceof AgentCommunicationDiagnosis1) {                                                    AgentCommunicationDiagnosis1 td = (AgentCommunicationDiagnosis1)d;                        try {                           td.setValue(newvalue);                           blackboard.openTransaction();                           blackboard.publishChange(td);                           blackboard.publishChange(td.getWrapper());                           blackboard.closeTransaction();                        } catch (IllegalValueException ive) {                        }                    }                     else if (d instanceof AgentCommunicationDiagnosis2) {                                                    AgentCommunicationDiagnosis2 td = (AgentCommunicationDiagnosis2)d;                        try {                           td.setValue(newvalue);                           blackboard.openTransaction();                           blackboard.publishChange(td);                           blackboard.publishChange(td.getWrapper());                           blackboard.closeTransaction();                        } catch (IllegalValueException ive) {                        }                    }                     break;                }             }        }