PreferencesKeys.LOCK_DURATION));
locomotiveControl.removeLocomotiveChangeListener(this, this);
for (Locomotive locomotive : persistence.getAllLocomotives()) {
LocomotiveType type = locomotive.getLocomotiveType();
SRCPLocomotive sLocomotive = null;
if (type.getTypeName().equals("DELTA")) {
sLocomotive = new MMDeltaLocomotive();
} else if (type.getTypeName().equals("DIGITAL")) {
sLocomotive = new MMDigitalLocomotive();
}
sLocomotive.setBus(locomotive.getBus());
sLocomotive.setAddress(locomotive.getAddress());
locomotiveSRCPLocomotiveMap.put(locomotive, sLocomotive);
SRCPLocomotiveLocomotiveMap.put(sLocomotive, locomotive);
}
locomotiveControl.addLocomotiveChangeListener(this, this);