/** * Returns the number of nodes in the context node-set. * * @param context the context at the point in the * expression where the function is called * @param args an empty list * * @return a <code>Double</code> containing the context size * * @throws FunctionCallException if <code>args</code> is not empty * * @see Context#getSize() */ public Object call(Context context, List args) throws FunctionCallException { if (args.size() == 0) { return evaluate( context ); } throw new FunctionCallException( "last() requires no arguments." ); }
new LastFunction() );
"last", new LastFunction());
"last", new LastFunction());