27 lines
637 B
Java
27 lines
637 B
Java
package ru.redguy.webinfomod.langs;
|
|
|
|
import com.google.gson.JsonObject;
|
|
|
|
public class Titles implements RootCategory {
|
|
|
|
JsonObject jsonObject;
|
|
|
|
public Titles(JsonObject jsonObject) {
|
|
this.jsonObject = jsonObject;
|
|
}
|
|
|
|
@Override
|
|
public String getString(Object object) {
|
|
if(object instanceof String) {
|
|
return jsonObject.get((String) object).getAsString();
|
|
} else {
|
|
return jsonObject.get(((ru.redguy.webinfomod.langs.enums.Titles) object).getName()).getAsString();
|
|
}
|
|
}
|
|
|
|
@Override
|
|
public Category getCategory(Object object) {
|
|
return null;
|
|
}
|
|
}
|