java.util.Vector<EmergencyContacts.ContactInfo> contacts = Application.getPatient().readEmergencyContacts().readContactInfos();
for (int i = 0; i < contacts.size(); i++){
EmergencyContacts.ContactInfo info = contacts.get(i);
}
public Vector<ContactInfo> readContactInfos(){
return contacts;
}
private Vector<ContactInfo> contacts = new Vector<ContactInfo>();
As you can see, it returns a Vector of ContactInfo. Why would I be getting an error saying, "Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException: java.lang.String cannot be cast to repository.EmergencyContacts$ContactInfo" for the line where it says . . . contacts.get(i)?
Also, if it matters, ContactInfo is an inner class of EmergencyContacts. Hence above where you can see it say readEmergencyContacts.readContactInfos. There is only one Object of type EmergencyContacts, which has the Vector of ContactInfo (which I posted in the code). And everything is Serializable.