2017-11-15 21:53:52 +00:00
|
|
|
package model;
|
|
|
|
|
|
|
|
import Classes.Languages;
|
|
|
|
|
|
|
|
public class LangModel {
|
2017-12-14 13:50:00 +00:00
|
|
|
|
2017-11-15 21:53:52 +00:00
|
|
|
private static LangModel instance;
|
2017-12-14 13:50:00 +00:00
|
|
|
|
2017-11-15 21:53:52 +00:00
|
|
|
private Languages fromLang = Languages.fr;
|
|
|
|
private Languages toLang = Languages.en;
|
2017-12-14 13:50:00 +00:00
|
|
|
|
|
|
|
|
2017-11-15 21:53:52 +00:00
|
|
|
private LangModel() {
|
|
|
|
}
|
2017-12-14 13:50:00 +00:00
|
|
|
|
2017-11-15 21:53:52 +00:00
|
|
|
public static LangModel getInstance() {
|
|
|
|
if(LangModel.instance == null) {
|
|
|
|
LangModel.instance = new LangModel();
|
|
|
|
}
|
2017-12-14 13:50:00 +00:00
|
|
|
|
2017-11-15 21:53:52 +00:00
|
|
|
return LangModel.instance;
|
|
|
|
}
|
2017-12-14 13:50:00 +00:00
|
|
|
|
2017-11-15 21:53:52 +00:00
|
|
|
public void setFromLang(Languages lang) {
|
|
|
|
this.fromLang = lang;
|
|
|
|
}
|
2017-12-14 13:50:00 +00:00
|
|
|
|
2017-11-15 21:53:52 +00:00
|
|
|
public Languages getFromLang() {
|
|
|
|
return this.fromLang;
|
|
|
|
}
|
2017-12-14 13:50:00 +00:00
|
|
|
|
2017-11-15 21:53:52 +00:00
|
|
|
public void setToLang(Languages lang) {
|
|
|
|
this.toLang = lang;
|
|
|
|
}
|
2017-12-14 13:50:00 +00:00
|
|
|
|
2017-11-15 21:53:52 +00:00
|
|
|
public Languages getToLang() {
|
|
|
|
return this.toLang;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|