Added support for short,long,float,double to Templator
This commit is contained in:
parent
df7d99ef8b
commit
95e6a2fbcf
2 changed files with 16 additions and 0 deletions
BIN
Zutil.jar
BIN
Zutil.jar
Binary file not shown.
|
|
@ -266,10 +266,26 @@ public class Templator {
|
||||||
if ((Boolean) obj)
|
if ((Boolean) obj)
|
||||||
super.compile(str);
|
super.compile(str);
|
||||||
}
|
}
|
||||||
|
else if(obj instanceof Short){
|
||||||
|
if ((Short) obj != 0)
|
||||||
|
super.compile(str);
|
||||||
|
}
|
||||||
else if(obj instanceof Integer){
|
else if(obj instanceof Integer){
|
||||||
if ((Integer) obj != 0)
|
if ((Integer) obj != 0)
|
||||||
super.compile(str);
|
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()) {
|
else if(obj instanceof Iterable || obj.getClass().isArray()) {
|
||||||
Object prevObj = get(".");
|
Object prevObj = get(".");
|
||||||
set(".", obj);
|
set(".", obj);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue