/** * Returns a double representation of the value. * * @param ii input info * @return double value * @throws QueryException query exception */ public double dbl(final InputInfo ii) throws QueryException { return Dbl.parse(atom(ii), ii); }
/** * Checks if the specified, non-empty item is a double. Returns the double or throws an exception. * * @param it item to be checked * @return number * @throws QueryException query exception */ private ANum toNumber(final Item it) throws QueryException { if (it.type.isUntyped()) return Dbl.get(it.dbl(info)); if (it instanceof ANum) return (ANum) it; throw numberError(this, it); }