1
package org.jboss.remoting.samples.transporter.complex;
3
import java.util.ArrayList;
4
import java.util.HashMap;
7
import org.jboss.remoting.samples.transporter.complex.Doctor;
10
* @author <a href="mailto:telrod@e2technologies.net">Tom Elrod</a>
12
public class Information
14
private static Information info = new Information();
15
private static Map providers = new HashMap();
16
private static List patients = new ArrayList();
20
Doctor p1 = new Doctor("Andy Jones", "financial");
21
providers.put("financial", p1);
22
Doctor p2 = new Doctor("Joe Smith", "medical");
23
providers.put("medical", p2);
25
Patient pat1 = new Patient("Larry", "Ellison");
29
Patient pat2 = new Patient("Steve", "Jobs");
34
public static Information getInstance()
39
public Doctor getProviderBySpecialty(String ailmentType)
41
return (Doctor) providers.get(ailmentType);
44
public void retireDoctor(Doctor doctor)
46
String specialty = doctor.getSpecialty();
47
providers.remove(specialty);