Package com.googlecode.aviator.runtime.function.system
package com.googlecode.aviator.runtime.function.system
-
ClassDescriptionAbstract base class for system min/max function.assert function to assert an expression's value is true, otherwise throw an exception.Assertion failiure.Cast value to bigintBinary function,includes +,-,*,/,%,!Cast value to boolean, return false when nil or false, otherwise returns true.Returns an implementation of java.util.Comparator based upon pred function.A compare function.Constant function to return the argument itself.date_to_string functionDateFormat cacheCast value to decimal.Cast value to double,double(a) eg.eval(script) , eval(script, bindings) and eval(script, bindings, cached) to execute a script with current env or special bindings, default is in caching mode.identity function return the argument itself.is_a(x, clazz) returns true when x is an intance of the class.is_def(x) returns true when variable x is defined in current scope or parent scopes.load('script.av') to load a script and retrieve it's exports.Cast value to longmax function to find the largest element in arguments.meta(obj, [key]) function to return the meatadata of obj [with the key], returns null if ithere is no metadata.min function to find the smallest element in arguments.now() function to invoke System.currentTimeMillis()println(obj) function to print objectprintln(obj) function to print object with newlinepst([out], e) function to print stacktrace of exceptionrand() function to generate random double valueA function to create a range in [start, end] with step.require('script.av') to load a script and retrieve it's exports, if it's required before, it will return the exports directly.seq(obj) function to cast a object into sequence, throw an runtime exception if fail.Cast value to stringstring_to_date functionsysdate() functiontuple(x,y,z, ...) function to return an object array.type(x) function return the type of x, the result is a string such as 'string', 'long', 'double' etc.undef(x) to forgot a variable that is defined in current scope.with_meta(obj, key, value) function to add metadata key/value to obj, return the obj.without_meta(obj, key) function to remove metadata by key from obj, return the obj.