示例#1
0
    public Object call(Scope scope, Object a, Object extra[]) {
      Object def = 0;
      if (extra != null && extra.length > 0) def = extra[0];

      if (scope.getThis() instanceof JSNumber) {
        JSNumber n = (JSNumber) (scope.getThis());
        n._val = _parse(a, def);
        return n._val;
      }

      return _parse(a, def);
    }
示例#2
0
 Number _parse(Object a, Object b) {
   return JSNumber.getNumber(a == null ? b : a);
 }