/** * Returns true if the string-value of the first item in <code>args</code> * starts with the string-value of the second item in <code>args</code>. * Otherwise it returns false. * * @param context the context at the point in the * expression when the function is called * @param args a list that contains two items * * @return <code>Boolean.TRUE</code> if the first item in <code>args</code> * starts with the string-value of the second item in <code>args</code>; * otherwise <code>Boolean.FALSE</code> * * @throws FunctionCallException if <code>args</code> does not have length two */ public Object call(Context context, List args) throws FunctionCallException { if (args.size() == 2) { return evaluate( args.get(0), args.get(1), context.getNavigator() ); } throw new FunctionCallException( "starts-with() requires two arguments." ); }