source: DCWoRMS/branches/coolemall/src/schedframe/resources/devices/DeviceFactory.java @ 1273

Revision 1273, 571 bytes checked in by wojtekp, 11 years ago (diff)
  • Property svn:mime-type set to text/plain
Line 
1package schedframe.resources.devices;
2
3import schedframe.resources.StandardResourceType;
4import schedframe.resources.devices.description.DeviceDescription;
5
6public class DeviceFactory {
7       
8        public static Device createDevice(DeviceDescription devDesc){
9               
10                if (devDesc.getType().equals(StandardResourceType.Fan))
11                        return new Fan(devDesc);
12                else if (devDesc.getType().equals(StandardResourceType.Inlet))
13                        return new Fan(devDesc);
14                else if (devDesc.getType().equals(StandardResourceType.Outlet))
15                        return new Fan(devDesc);
16                else
17                        return new Device (devDesc);
18        }
19}
Note: See TracBrowser for help on using the repository browser.