Package ch.rakudave.jnetmap.model.factories

Source Code of ch.rakudave.jnetmap.model.factories.DeviceFactory

package ch.rakudave.jnetmap.model.factories;

import org.apache.commons.collections15.Factory;

import ch.rakudave.jnetmap.model.device.Device;
import ch.rakudave.jnetmap.model.device.Host;
import ch.rakudave.jnetmap.model.device.Device.Type;

/**
* @author rakudave
*/
public class DeviceFactory implements Factory<Device> {
  private static Type type = Type.Workstation;

  @Override
  public Device create() {
    return new Host(type);
  }

  public static void setType(Type t) {
    if (t != null) type = t;
  }
}
TOP

Related Classes of ch.rakudave.jnetmap.model.factories.DeviceFactory

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.