示例#1
0
        /**
         * Returns the numerical value at array index i. If the actual value is not
         * numeric, it is converted automatically.
         */
        public double getNumber(int i)
        {
            if (i >= size_)
            {
                return(0);
            }
            Object o = objects[i];

            return(o == NUMBER_MARKER ? numbers[i] : JsSystem.toNumber(o));
        }
示例#2
0
 /**
  * Returns the numeric value for the given key. If the actual value is not
  * numeric, it is converted automatically, using the ECMA 262 conversion
  * rules.
  */
 public double getNumber(String key)
 {
     return(JsSystem.toNumber(getObject(key)));
 }