Added support for short,long,float,double to Templator

This commit is contained in:
Ziver Koc 2016-01-25 09:53:00 +01:00
parent df7d99ef8b
commit 95e6a2fbcf
2 changed files with 16 additions and 0 deletions

BIN
Zutil.jar

Binary file not shown.

View file

@ -266,10 +266,26 @@ public class Templator {
if ((Boolean) obj)
super.compile(str);
}
else if(obj instanceof Short){
if ((Short) obj != 0)
super.compile(str);
}
else if(obj instanceof Integer){
if ((Integer) obj != 0)
super.compile(str);
}
else if(obj instanceof Long){
if ((Long) obj != 0l)
super.compile(str);
}
else if(obj instanceof Float){
if ((Float) obj != 0f)
super.compile(str);
}
else if(obj instanceof Double){
if ((Double) obj != 0d)
super.compile(str);
}
else if(obj instanceof Iterable || obj.getClass().isArray()) {
Object prevObj = get(".");
set(".", obj);