/** Returns the smallest integer greater than or equal to a number. * * @param context the context at the point in the * expression when the function is called * @param args a list with exactly one item which will be converted to a * <code>Double</code> as if by the XPath <code>number()</code> function * * @return a <code>Double</code> containing the smallest integer greater than or equal * <code>args.get(0)</code> * * @throws FunctionCallException if <code>args</code> has more or less than one item */ public Object call(Context context, List args) throws FunctionCallException { if (args.size() == 1) { return evaluate( args.get(0), context.getNavigator() ); } throw new FunctionCallException("ceiling() requires one argument."); }
new CeilingFunction() );
"ceiling", new CeilingFunction());
"ceiling", new CeilingFunction());