Exemplo n.º 1
0
  /**
   * Checks if the specified expression yields a double. Returns the double or throws an exception.
   *
   * @param e expression to be checked
   * @param ctx query context
   * @return double
   * @throws QueryException query exception
   */
  public final double checkDbl(final Expr e, final QueryContext ctx) throws QueryException {

    final Item it = checkNoEmpty(e.item(ctx, input), AtomType.DBL);
    if (!it.unt() && !it.num()) Err.number(this, it);
    return it.dbl(input);
  }