JEXL script | var d = new('java.lang.Double', 0d);
return 'minmum of positive=' + d.MIN_VALUE + ' maximum=' + d.MAX_VALUE; |
JEXL script | var s = new('java.lang.String', 'Hello');
return 'include e:'+ s.contains('e') + ' length:' + s.length(); |
JEXL script | var date = new('java.util.Date');
return 'current time:' + date.toString() + ' value:' + date.getTime(); |
JEXL script | Math.E |
JEXL Context | jexlContext.set("Math", Math.class); |
JEXL script | Math.PI |
JEXL Context | jexlContext.set("Math", Math.class); |
JEXL script | Math.abs(-5.611) |
JEXL Context | jexlContext.set("Math", Math.class); |
JEXL script | Math.sqrt(9) |
JEXL Context | jexlContext.set("Math", Math.class); |
JEXL script | Math.cbrt(27) |
JEXL Context | jexlContext.set("Math", Math.class); |
JEXL script | Math.pow(2,5) |
JEXL Context | jexlContext.set("Math", Math.class); |
JEXL script | Math.exp(2) |
JEXL Context | jexlContext.set("Math", Math.class); |
JEXL script | Math.log(6) |
JEXL Context | jexlContext.set("Math", Math.class); |
JEXL script | Math.log10(6) |
JEXL Context | jexlContext.set("Math", Math.class); |
JEXL script | Math.cos(0) |
JEXL Context | jexlContext.set("Math", Math.class); |
JEXL script | Math.sin(9) |
JEXL Context | jexlContext.set("Math", Math.class); |
JEXL script | Math.tan(5) |
JEXL Context | jexlContext.set("Math", Math.class); |
JEXL script | Math.atan(-7.3) |
JEXL Context | jexlContext.set("Math", Math.class); |
JEXL script | Math.acos(0.5) |
JEXL Context | jexlContext.set("Math", Math.class); |
JEXL script | Math.asin(0.3) |
JEXL Context | jexlContext.set("Math", Math.class); |
JEXL script | Math.ceil(4.13) |
JEXL Context | jexlContext.set("Math", Math.class); |
JEXL script | Math.floor(4.67) |
JEXL Context | jexlContext.set("Math", Math.class); |
JEXL script | Math.round(4.83) |
JEXL Context | jexlContext.set("Math", Math.class); |
JEXL script | Math.random( ) |
JEXL Context | jexlContext.set("Math", Math.class); |
JEXL script | Math.max(1,-3) |
JEXL Context | jexlContext.set("Math", Math.class); |
JEXL script | Math.min(1,-3) |
JEXL Context | jexlContext.set("Math", Math.class); |
JEXL script | var value = 3;
var array = [1,'2',3, 'hello'];
value =~ array; |
JEXL script | var value = 2;
var set = {1,'2',3, 'hello'};
value !~ set; |
JEXL script | var s = 'abc1233hello';
var regex = '\\S*3{2,}\\S*';
var caseInsensitive = true;
StringTools.match(s,regex,caseInsensitive); |
JEXL Context | jexlContext.set("StringTools", mara.mybox.tools.StringTools.class); |
JEXL script | var s = 'abc1233hello';
var regex = '3{2}';
var caseInsensitive = true;
StringTools.include(s,regex,caseInsensitive); |
JEXL Context | jexlContext.set("StringTools", mara.mybox.tools.StringTools.class); |
JEXL script | var a = 5;
var b = 2;
'hello'.startsWith('hell') and ( a < 9 or b >= 6 ) and not ( a == b ); |
JEXL script | var d = 52362.18903;
var scale = 2;
DoubleTools.scale(d, scale); |
JEXL Context | jexlContext.set("DoubleTools", mara.mybox.tools.DoubleTools.class); |
JEXL script | var d = 52362.18903;
var scale = 2;
DoubleTools.format(d, scale); |
JEXL Context | jexlContext.set("DoubleTools", mara.mybox.tools.DoubleTools.class); |
JEXL script | var number = 37;
var total = 518;
var scale = 2;
DoubleTools.percentage(number, total, scale); |
JEXL Context | jexlContext.set("DoubleTools", mara.mybox.tools.DoubleTools.class); |
JEXL script | DateTools.nowString(); |
JEXL Context | jexlContext.set("DateTools", mara.mybox.tools.DateTools.class); |
JEXL script | var date = new('java.util.Date');
var format = 'yyyy-MM-dd HH:mm:ss.SSS';
DateTools.datetimeToString(date, format); |
JEXL Context | jexlContext.set("DateTools", mara.mybox.tools.DateTools.class); |
JEXL script | var array = [ 'A', 'B', 'C', 'D' ];
var arrayString = '';
for (var i : 1 .. size (array)) {
if (empty (arrayString)) {
arrayString = array[i-1];
} else {
arrayString += ' , ' + array[i-1];
}
}
return arrayString; |
JEXL script | var circleArea = function(r) {
Math.PI * r * r
}
var r = 9.42;
return circleArea(r); |
JEXL Context | jexlContext.set("Math", Math.class); |